Cannot use Having without:
Group by, because its a group level filtering criteria.
What are the BIG 6 ELEMENTS of a sql query?
1) SELECT: identifies the columns.
2) FROM: identifies the table
3) WHERE: filter your results
4) GROUP BY: how to group the data.
5) HAVING: group filtering criteria
6) ORDER BY: order of the displayed results.
Which two components of a query are absolutly essential?
Select and from.
What is the USE statement?
You tell the query which database it should query. You can avoid having to use the USE statement if you set the default database to the one you are using.