Check examples of database queries using aggregates and custom SQL queries. See how to manipulate sets of records returned using filters, sorting or operations other operations supported by aggregates.