This page provides exercises and solutions to help you practice SQL WHERE clause. These exercises are based on the HR 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.
 

Exercises

  1. Display the first name and department number for all customers whose last name is “De Haan” (Employees table).
  2. Display all data from Departments table for Sales department (department_name column).
  3. Display the first name, last_name, department number and salary for all employees who earn more than 9700 (Employees table).

Would you like to read more?