Worksheets, table scripts and answers for a first course in SQL: selecting and filtering rows, sorting, changing data, and joining tables.
Instructor: Ioannis Tsioulis
- The worksheets on the Students and Employees tables and the joins lab ask you to work in the Programiz online SQL editor: paste the table script first, then write your queries. Nothing needs to be installed.
- The Films exercises use a Microsoft Access database, Films.accdb.
Looking for a complete course? From One Table to a Cluster: Working with Data at Scale on my website starts from SQL and goes on to data warehouses, NoSQL, Spark and streaming.
| Material | What it covers | Answers |
|---|---|---|
| SQL1.sql | Script that creates and fills the Students table, followed by first queries with WHERE and ORDER BY |
|
| SQL exercise1.txt | Exercises on LIKE, combined conditions and sorting |
Answers |
| SQLQuery2.sql | Worked queries: LIKE, BETWEEN, COUNT, INSERT, UPDATE, DELETE |
|
| SQL_Exercises2_Students_.pdf | Worksheet with the table set-up and 18 exercises | Answers |
| Material | What it covers | Answers |
|---|---|---|
| SQL_Table2.sql | Script that creates and fills the Employees table |
|
| SQL_Exercises_Questions_Only.pdf | Exercises on filtering, sorting and choosing columns | Answers |
| SQL_Table2_answers.pdf | Ten further questions on the Employees table, each with its answer |
| Material | What it covers | Answers |
|---|---|---|
| SQL_Lab3_Joins_Presentation.pptx | Slides that introduce the JOIN operation |
|
| SQL_Lab3_Joins.pdf | Lab sheet: short theory, table set-up and ten join exercises | Answers |
| Material | What it covers | Answers |
|---|---|---|
| Films.accdb | Microsoft Access database with three tables: Actor, Film and Film_Actor |
|
| SQL_Films_Exercises.pdf | Ten exercises, from simple selections to actors and the films they appeared in | Answers |
© Ioannis Tsioulis. Prepared for educational use.