About this question
If I have to make a SOQL Query with the animals sorted by CreatedDate DESC and Zoo Id, wherein I have object Animal__c and field ZooId, then how can I sort this using SOQL orderby instead of using GROUP BY? My target result is:
Animal 3 ZooId 5 CreatedDate Today
Animal 0 ZooId 5 CreatedDate Yesterday
Animal 4 ZooId 5 CreatedDate Yesterday
Animal 1 ZooId 4 CreatedDate Today
Animal 2 ZooId 4 CreatedDate Yesterday