SQL Exercises, Practice, Solution
This resource offers a total of 2605 SQL problems for practice. It includes 1246 main exercises, each accompanied by solutions, detailed explanations, and four/five related problems.
SQL Exercises :
SQL (Structured Query Language) is an ANSI-standard language for managing and manipulating relational database systems. It retrieves, updates, and organizes data stored in tables, where relationships between data are also defined through tables.
Master SQL through hands-on practice! This section offers exercises for beginners to advanced users. Happy coding!
You may read our SQL tutorial before solving the following exercises.
List of SQL Exercises:
Database Design and Structure SQL Fundamentals- SQL Data Definition Language (DDL) [75 Exercises]
- SQL Data Manipulation Language (DML) [80 Exercises]
- SQL Retrieve data from tables [165 Exercises]
- SQL Quering on Multiple Tables [48 Exercises]
- SQL Boolean and Relational operators [60 Exercises]
- SQL Wildcard and Special operators [110 Exercises]
- SQL JOINS [29 Exercises]
- SQL SUBQUERIES [39 Exercises]
- SQL Union[9 Exercises]
- SQL View[16 Exercises]
- FILTERING and SORTING on HR Database [38 Exercises]
- SQL JOINS on HR Database [27 Exercises]
- SQL SUBQUERIES on HR Database [55 Exercises]
- SQL Transactions and Concurrency Control [70 Exercises]
- Security and Access Control [100 Exercises]
- SQL User Account Management [16 Exercise]
- BASIC queries on movie Database [10 Exercises]
- SUBQUERIES on movie Database [16 Exercises]
- JOINS on movie Database [24 Exercises]
- Introduction
- BASIC queries on soccer Database [29 Exercises]
- SUBQUERIES on soccer Database [33 Exercises]
- JOINS queries on soccer Database [61 Exercises]
Structure of inventory database :
Structure of HR database :
Structure of movie database :
Structure of soccer database :
Structure of employee database :
Structure of hospital database :
Syntax diagram of SQL SELECT statement

You may download the structure and data of the tables of database on which SQL Exercises are built.
Please note that PostgreSQL 9.4 is used and the file which you would download is generated using pg_dump
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics