SQL Zoo is a set of tutorials to help you learn SQL that progressively increases in difficulty.
Queries can be run against the tables in their database. The problems were completed using the MySQL engine as part of the curriculum for The Odin Project, an excellent MOOC that teaches you full-stack web development.
Among the necessary skills required, I learned:
-
SELECT basics
-
to use pattern matching in queries
-
to work with various sets of data
- e.g. data regarding countries and stats related to their populations
- Nobel prize winners
- matches and goals from one of the EUFA EURO Football Championships
- movies, directors and castings
- student survey data from UK higher education graduates
- UK general elections
- bus route data from the Edinburgh Travelmap
-
use SELECT within SELECT for more advanced queries
-
use aggregate functions such as:
- AVG()
- COUNT()
- MAX()
- MIN()
- SUM()
-
use GROUP BY to join data
-
use JOINs (e.g. SELF JOIN, INNER JOIN, LEFT JOIN, etc.)
-
use CASE statements
-
handle columns containing NULL data
There are three questions flagged in the "extra credit" sections missing answers that I had to look at the solutions for. I did not want to claim them as my own and so they have been omitted. Additionally, the last answer for the final question (in 9 Self Join) is properly credited to StackOverflow user fish-404 (his answer can be seen here).