CodeEraFree roadmap

SQL practice sets

23 topics, free. Every topic has its own page with the questions, solved queries and real output. Try the questions first, then open the answer. PDFs are there too if you like to practise offline.

Start here: set up your practice table

All sets use the same employees table. Create it and insert the data once, then follow the topics below.

Top 9 most asked interview queries

A short study note with the nine queries interviewers ask most.

0 of 23 done

Create and add data

Build the table you will practise on.

CREATE command

Create a database and a table

Read and filter

Ask the table questions: pick columns, filter, sort and limit.

SELECT command

Read columns from a table

WHERE clause

Filter rows with conditions and operators

AND, OR and NOT

Combine several conditions

BETWEEN and IN

Ranges and lists of values

LIKE and wildcards

Pattern matching with % and _

LIMIT and OFFSET

Return only some rows (MySQL, PostgreSQL)

TOP and FETCH FIRST

The same idea in SQL Server and Oracle

Summarise data

Count, total and average, per group.

Aggregate functions

COUNT, SUM, AVG, MIN and MAX

GROUP BY clause

One result row per group

HAVING clause

Filter groups after GROUP BY

Functions

Built-in helpers for text, numbers and dates.

Combine tables and results

Joins and set operators.

Set operators

Combine the results of two queries

INNER and NATURAL JOIN

Combine rows from two tables

Change data and tables

Update rows, alter tables, delete safely.

ALTER command

Change a table's structure

Next level

Window functions come up in almost every senior interview.

Done with the basics?

The PDF kits go further: real MNC and Big Tech questions with the traps interviewers hide in them.