All roadmaps
SQLBasic

SQL for Absolute Beginners

Write your very first SQL queries with confidence. Every problem here teaches one keyword — SELECT, WHERE, ORDER BY, LIKE, IN, LIMIT, GROUP BY. No joins, no subqueries, just pure SQL fundamentals.

20 problems~3h
1
Big Countriesbasicsql

SELECT + WHERE with two conditions (AND / OR) — your very first query. Read a table, filter rows, return columns.

2
Recyclable and Low Fat Productsbasicsql

WHERE with AND on two columns — combining multiple filter conditions in a single query.

3
Not Boring Moviesbasicsql

WHERE + ORDER BY — filter rows then sort the result. Two of the most used clauses together.

4
Find Customer Refereebasicsql

WHERE with IS NULL and <> — handling NULL values correctly. NULLs behave differently from empty strings.

5
Customers Sorted by City and Namebasicsql

ORDER BY multiple columns — primary sort key and secondary sort key. Multi-column ordering syntax.

6
Top 5 Most Expensive Productsbasicsql

ORDER BY DESC + LIMIT — get the top N rows. The most common pattern in leaderboard and ranking queries.

7
Products Under Budgetbasicsql

WHERE with a numeric comparison — filter rows where a number column is below a threshold.

8
High Value Ordersbasicsql

WHERE with >= on a value column — filtering on amount thresholds, the basis of every business rule query.

9
Sales Between Two Datesbasicsql

WHERE with BETWEEN on dates — date range filtering. BETWEEN is inclusive on both ends.

10
Employees Hired This Yearbasicsql

WHERE with date function — YEAR(hire_date) or date_trunc(). Extracting parts of a date column.

11
Customers from Specific Statesbasicsql

WHERE column IN (...) — filter against a list of values. Cleaner than writing multiple OR conditions.

12
Find Gmail Customersbasicsql

WHERE column LIKE '%pattern' — wildcard string matching. % matches any sequence of characters.

13
Products Matching Keywordbasicsql

WHERE LIKE with % on both sides — search for a substring anywhere in a column value.

14
Employee Full Namebasicsql

SELECT with CONCAT() or || operator — building a new column by combining two string columns.

15
Annual Salary from Monthly Paybasicsql

SELECT with arithmetic — multiply a column by a constant. Derived columns with expressions in SELECT.

16
Calculate Discounted Pricebasicsql

SELECT column * expression — apply a percentage discount. Arithmetic on column values in SELECT.

17
List Unique Product Categoriesbasicsql

SELECT DISTINCT — remove duplicate rows from results. The SQL equivalent of a set operation.

18
Employee Count by Departmentbasicsql

GROUP BY + COUNT(*) — your first aggregation. Group rows and count how many fall in each bucket.

19
Monthly Sales Totalsbasicsql

GROUP BY + SUM() — aggregate a numeric column per group. The foundation of every reporting query.

20
Find Duplicate Phone Numbersbasicsql

GROUP BY + HAVING COUNT > 1 — filter groups after aggregation. HAVING is to groups what WHERE is to rows.