Query distinct rows?

First you must understand the query you are trying to do. If you want to use any aggregation like max, you need to have something to group by. The same as normal SQL.

Most of parameters you use in Parse SDK are queries that you can normally run in a mongoDB shell.