This page provides exercises and solutions to help you practice SQL JOIN queries. These exercises are based on the ACDB database, and may be performed online or by running the sample schema scripts on your local database server. For additional exercises in other subjects, use this link.
 

Inner JOIN

  1. Customers and internet packages (Customers & Packages tables) –
    1. Write a query to display first name, last name, package number and internet speed for all customers.
    2. Write a query to display first name, last name, package number and internet speed for all customers whose package number equals 22 or 27. Order the query in ascending order by last name.
  2. Internet packages and sectors –
    1. Display the package number, internet speed, monthly payment and sector name for all packages (Packages and Sectors tables).
    2. Display the customer name, package number, internet speed, monthly payment and sector name for all customers (Customers, Packages and Sectors tables).
    3. Display the customer name, package number, internet speed, monthly payment and sector name for all customers in the business sector (Customers, Packages and Sectors tables).
  3. Display the last name, first name, join date, package number, internet speed and sector name for all customers in the private sector who joined the company in the year 2006.

 

Would you like to read more?