Postgres-a-palooza

Using the included schema and sample data (you can add more if it helps your testing), write SQL queries that will answer the questions listed in queries.sql. These are listed roughly in increasing order of difficulty, with the last two being extremely tricky. Do not expect to complete them all! Limit yourself to about 3 hours on this.

If you think you have a query correct and want to check your answer, results.txt contains the expected results for all of the queries when run on the provided sample data.