Practise SQL queries, multi-table joins and interview scenarios. Check your approach against a numbered answer sheet with SQL solutions and short explanations.
Model answers included · No account required · Private download after successful payment
SEE WHAT YOU WILL PRACTISE
Sample questions from this PDF
Try the questions first. Open the model answer below to see the explanation and SQL solution.
Sample 1
Using Customers, Orders and Regions, show order_id, customer name and region name. Rename the two names customer_name and region_name. Return only rows with both lookup matches.
Read the model answer from this PDF
Explicit aliases prevent two output columns both being called name.
Example schema: Customers(customer_id, name, region_id), Orders(order_id, customer_id), Regions(region_id, name). Lookup IDs are unique.
SELECT o.order_id,
c.name AS customer_name,
r.name AS region_name
FROM Orders o
JOIN Customers c ON c.customer_id = o.customer_id
JOIN Regions r ON r.region_id = c.region_id;
SQL formatting is expanded for readability. Check syntax for your database.
Sample 2
Using Customers, Orders and Shipments with LEFT JOIN, keep customers without orders and orders without shipments. Show all three IDs.
Sample 3
Using Orders, OrderLines and Products, run a read-only joined line-value total inside BEGIN and ROLLBACK. Explain whether ROLLBACK changes the selected data.
Your revision, organised
220 numbered questions across 20 topics
Numbered answer sheet for checking your reasoning
Clickable topic index for focused revision
66 PDF pages to save and study at your pace
See all topics in this PDF
SQL basics, SELECT and DISTINCT · 11 questions
WHERE, IN and BETWEEN · 11 questions
NULL, COALESCE and NULLIF · 11 questions
ORDER BY and row limits · 11 questions
COUNT, SUM and AVG · 11 questions
GROUP BY and HAVING · 11 questions
INNER JOIN · 11 questions
LEFT and FULL OUTER JOIN · 11 questions
Self joins and CROSS JOIN · 11 questions
Subqueries and EXISTS · 11 questions
CASE and conditional aggregation · 11 questions
UNION, INTERSECT and EXCEPT · 11 questions
String functions · 11 questions
Date and time functions · 11 questions
CAST and numeric functions · 11 questions
ROW_NUMBER, RANK and DENSE_RANK · 11 questions
CTEs and reusable queries · 11 questions
Keys, constraints and relationships · 11 questions
INSERT, UPDATE and DELETE · 11 questions
Indexes and transaction basics · 11 questions
A curated practice bank of independently written exercises and adapted public interview themes. These are not verified questions from particular companies. Experience bands indicate practice depth.
Try free SQL interview questions
Practise the fundamentals, explain a scenario and compare your approach with a short answer.