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.
- First try your query as normal SQL in a sql database using sql fiddle http://sqlfiddle.com/
- Then you move into MongoDB and try the query in mongodb shell or mongodb compass https://docs.mongodb.com/manual/reference/operator/aggregation/max/
- Then the solution will come naturally when you use parse.
Most of parameters you use in Parse SDK are queries that you can normally run in a mongoDB shell.