sort fields get table name prefix; added support for `joins`