It works in MySQl because MySQL has a shoddy interpretation of SQL.
In any proper dialect, anything in the SELECT or ORDER BY clauses needs to be either an aggregate function, or a GROUPed expression.
At the very least, you're going to need to group by ba.uuid, lastname and city.