Instructor: Jing Gong. Class Time: M/W/F 2:00-2:50 pm

Review and Study Guides

Review for Exam 2: Online Practice Problems on Subselects and Joins

Some of you have requested more practice problems for SQL. Here are some exercises on w3resource.com, in case you need additional practice.
http://www.w3resource.com/mysql-exercises/subquery-exercises/
Q1, Q6, Q8, Q9

http://www.w3resource.com/sql-exercises/subqueries/index.php
Q1, Q2, Q3, Q7, Q8, Q12, Q13, Q14, Q25

http://www.w3resource.com/sql-exercises/sql-exercises-quering-on-multiple-table.php
Q1, Q2, Q3, Q4, Q7

Note that the solutions provided in these resources did not specify the schema name. But in the exam, you should include the schema name.

For example, in these resources, they may have SQL queries like this:

SELECT first_name, last_name, salary

FROM employees;

But as we learned in class, we should specify schema name, which is “hr“, as follows:

SELECT first_name, last_name, salary

FROM hr.employees;

Other than this key difference, these practice questions should be good resources for practice.

 

Additional Practice Problems (ERD, Schema, Advanced SQL)

Some students mentioned that they would like to practice on ERD/schema/SQL questions.

Here is an additional ERD and Schema exercise for practice: Additional ERD and Schema Exercise

Here are some additional practice questions on advanced SQL queries (Joining tables, LIMIT, and subselects): Additional Pen-and-Paper SQL Query Exercise (NOTE that Advanced SQL queries — Joining tables and subselects — will not be covered in Exam 1)

Both exercises will not be collected. Solutions are already included.