Practice SQL Subqueries | HR

This page provides exercises and solutions to help you practice SQL Subqueries. 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.

SQL Subqueries Practice

  1. Display the first name and salary for all employees who earn more than employee number 103 (Employees table).
  2. Display the department number and department name for all departments whose location number is equal to the location number of department number 90 (Departments table).
  3. Display the last name and hire date for all employees who was hired after employee number 101 (Employees table).

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…