This assignment will give you more more practice working with SQL Select queries. You will need to do that on the exam!

Deadline: Wednesday 2/24 before class. NO LATE SUBMISSIONS WILL BE ACCEPTED!

Assignment Repository

Create a github classrooms repository using this link: https://classroom.github.com/a/b-RjkI7X

GitHub Classrooms has been configured to link your repo to Repl.it. You can do your coding in Repl or someplace else of your choice. When you load Repl for the first time after cloning the assignment, it will attempt to detect the programming language. Sometimes this does not work correctly and you can just reload the page; after that it should work.

The Repl is configured slightly differently from the ones we have used in prior assignments. You will not be able to directly type SQL commands into the “Console” window. Instead you will need to write all queries into your file and click the run button. Alternatively, you can use the “Shell” window and run sqlite3 directly to get a SQL terminal similar to what we had in prior assignments.

Instructions

You must:

  • Complete this assignment on your own
  • Write SQL queries to answer the questions listed in main.sql. That is the only file you should modify.
  • For full credit, your output should look exactly identical to what is provided in solution.txt. This includes using the same column names in cases where the output has been renamed from the normal column header.
  • Commit and push all of your code before class on 2/24 to receive credit

You can check how your output compares to the solution by running this in the Shell window:

sqlite3 < main.sql > output.txt
diff solution.txt output.txt

If there are no differences between the two files, the command will return without output. Otherwise it will indicate which lines have differences.

If you are using Repl, then you can commit/push your code either by running commands as normal in the Shell pane, or by using the Version Control tab on the left of the window. Be sure to check your GitHub repository directly to ensure that your code has been uploaded successfully. No late assignments will be accepted, even if it is just because you didn’t correctly commit your files!