1: execution order select from where group by having order by the
First you have to query that table from, in these conditions the filter table where, group by group after filtration is complete, select which fields to display query, having a secondary filter for fields, and finally sorting show