We’re not far away from learning all possible SQL keywords. I hope you remember all steps of they execution by heart. Let’s go over them to make sure it’s the case:
FROM
is checked first, SQL engine will know from which table to read records firstJOIN
goes second. The records fromJOIN
tables are also read and joined with our main tableWHERE
comes next – we filter the records from the final big tableGROUP BY
splits final big table into smaller groupsSELECT
is processed next, columns and results of all functions are calculatedDISTINCT
...