SQL Practice Logo

SQLPractice Online

Home/Practice/

HR Database

Free Practice Mode

HR Database SQL Practice Exercises

Human Resources management system with employees, departments, and job roles

3 ExercisesBeginner to Advanced Level

Basic Employee Queries

Beginner
01

Learn to SELECT employee data with filtering and sorting

Topics Covered:

SELECTWHEREORDER BY

Sample Query:

SELECT first_name, last_name, salary FROM employees WHERE salary > 50000 ORDER B...
Start Exercise

Department Analysis

Intermediate
02

JOIN employees with departments and calculate aggregates

Topics Covered:

JOINGROUP BYCOUNT

Sample Query:

SELECT d.department_name, COUNT(e.employee_id) as emp_count, AVG(e.salary) as av...
Start Exercise

Salary Reporting

Advanced
03

Complex salary analysis with subqueries and window functions

Topics Covered:

SubqueriesWindow FunctionsCASE

Sample Query:

SELECT first_name, last_name, salary, CASE WHEN salary > (SELECT AVG(salary) FRO...
Start Exercise

Ready for Free Practice?

Explore the hr database database on your own. Write any SQL query and see results instantly.

Open SQL Practice Environment