SQL Revision ← Back to the free app

Study packs for SQL

Crack SQL exams and interviews.

Questions, notes and solved practice sets, written once and checked by running every query. Download the PDF and study anywhere, even offline.

Instant PDFEvery query testedOne-time price, no subscriptionWorks on phone

Payments are opening soon. You can already read the free sample below. The Buy buttons switch on when checkout goes live.

A look inside

Not a wall of text. Every answer comes with the query, the real output and the reason.

Interview Q&A

Q: How do you find the second highest salary?

SELECT MAX(salary) AS second_highest
FROM employees
WHERE salary < (SELECT MAX(salary)
                 FROM employees);

second_highest
--------------
95000

The maximum of everything below the maximum. It copes with ties at the top.

Premium practice set

C14. Customers who never ordered [Medium]

SELECT c.name
FROM customers c
WHERE NOT EXISTS (
  SELECT 1 FROM orders o
  WHERE o.cust_id = c.cust_id);

name
----
Lata

NOT EXISTS stays correct even when the subquery column can be NULL, unlike NOT IN.

Questions

What format are the files?

PDF, A4, readable on phone, tablet and laptop. No account or app needed.

Which SQL do they use?

Standard SQL that runs on MySQL 8, PostgreSQL and SQLite. MySQL-only functions such as YEAR() are marked, and Class 12 board points are called out in the notes.

How do I know the answers are right?

Every query in the practice sets and the query answers in the interview bank were run on a real SQL engine against the sample database printed in the book, and the output you see is the output it produced.

Is there a free sample?

Yes: ten interview questions, the Joins chapter and three solved practice questions. Use the Free sample button on any product.

Can I share the PDF with friends?

The files are for your own study. Please do not share or resell them. Friends can grab the free sample and the free app.

Something is wrong with my file.

Tell us through the issues page and we will fix it or make it right.