Extra-Practice-Problems-for-SQL
Extra-Practice-Problems-for-SQL
Use these as extra practice – either for your SQL #1 assignment, studying for the exams, or both!
It may also be helpful to run a query that retrieves all data in the table to see how it’s structured (i.e.,
SELECT * FROM mxsales.retail_sales_feb).
5. What are the names of customers who had Dakic as a sales rep?
6. Which sales rep had the highest total sales (list them all to find out)?
7. Which sales rep sold the most laser printers (list them all to find out)?
10. What is the name of the customer who had Sheedy as a sales rep and bought a Color Scanner?
11. Which customers bought products more than $300 and what were the names of those products?
Multi-table Queries (Joins)
For these use the moviedb database. Make sure you look at the Movie Rental Schema.
14. Which country has the most customers (list them all to find out)?
16. What is the largest single payment made by Emily Diaz? (use a subselect)
17. Which customers made the largest single payment in India? What was the amount? (use a
subselect)
Answer Key for SQL Practice Problems
Remember, your schema name will look a little different (i.e., m100sales, m118sales, etc.). Use your own MySQL account.