0% found this document useful (0 votes)
344 views8 pages

SQL Exercises, Practice, Solution

This document provides an introduction to SQL and lists over 500 SQL exercises organized into categories to help users practice and improve their SQL skills. It describes SQL as a standard language for accessing and manipulating database systems and managing relational database tables. The best way to learn is through practice and exercises. Various database structures are described to provide sample data for the exercises.

Uploaded by

Oana Achitei
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
344 views8 pages

SQL Exercises, Practice, Solution

This document provides an introduction to SQL and lists over 500 SQL exercises organized into categories to help users practice and improve their SQL skills. It describes SQL as a standard language for accessing and manipulating database systems and managing relational database tables. The best way to learn is through practice and exercises. Various database structures are described to provide sample data for the exercises.

Uploaded by

Oana Achitei
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 8

SQL Exercises, Practice, Solution

Last update on February 26 2020 08:07:50 (UTC/GMT +8 hours)

What is SQL?
SQL stands for Structured Query Language and it is an ANSI standard computer
language for accessing and manipulating database systems. It is used for
managing data in relational database management system which stores data in
the form of tables and relationship between data is also stored in the form of
tables. SQL statements are used to retrieve and update data in a database.

The best way we learn anything is by practice and exercise questions. We have
started this section for those (beginner to intermediate) who are familiar
with SQL. Hope, these exercises help you to improve your SQL skills. Currently
following sections are available, we are working hard to add more exercises.
Happy Coding!

List of SQL Exercises

 SQL Retrieve data from tables [33 Exercises]

 SQL Boolean and Relational operators [12 Exercises]

 SQL Wildcard and Special operators [22 Exercises]

 SQL Aggregate Functions [25 Exercises]

 SQL Formatting query output [10 Exercises]

 SQL Quering on Multiple Tables [7 Exercises]

 FILTERING and SORTING on HR Database [38 Exercises]

 SQL JOINS

o SQL JOINS [29 Exercises]

o SQL JOINS on HR Database [27 Exercises]

 SQL SUBQUERIES
o SQL SUBQUERIES [39 Exercises]

o SQL SUBQUERIES on HR Database [55 Exercises]

 SQL Union[9 Exercises]

 SQL View[16 Exercises]

 SQL User Account Management [16 Exercise]

 Movie Database

o BASIC queries on movie Database [10 Exercises]

o SUBQUERIES on movie Database [16 Exercises]

o JOINS on movie Database [24 Exercises]

 Soccer Database

o Introduction

o BASIC queries on soccer Database [29 Exercises]

o SUBQUERIES on soccer Database [33 Exercises]

o JOINS queries on soccer Database [61 Exercises]

 Hospital Database

o Introduction

o BASIC, SUBQUERIES, and JOINS [39 Exercises]

 Employee Database

o BASIC queries on employee Database [115 Exercises]

o SUBQUERIES on employee Database [77 Exercises]

 More to come!

Structure of inventory database :


Structure of HR database :

Structure of movie database :


Structure of soccer database :
Structure of employee database :

Structure of hospital database :


You may download the structure and data of the tables of database on which
SQL Exercises are built.

Syntax diagram of SQL SELECT statement


Please note that PostgreSQL 9.4 is used and the file which you would download
is generated using pg_dump

You might also like