PostgreSQL
Ask questions of a real PostgreSQL database, from your first SELECT to schema design. 21 modules of 10 minutes each, with questions that check your answers in the browser.
Foundations
- 1. What a relational database is: tables, rows, columnsFreeMeet the database you'll use all track long, and learn the words everyone uses to talk about tables.
- 2. SELECT and FROMFreeAsk for exactly the columns you need, in the order you want, and read the result like a pro.
- 3. WHERE and comparison operatorsFreeKeep only the rows you care about, combine conditions safely, and avoid the AND/OR trap that silently breaks reports.
- 4. ORDER BY and LIMITFreeSort results the way people read them, get the top N rows, page through results, and avoid the tie trap.
- 5. DISTINCT and basic expressionsFreeRemove duplicate rows, calculate new columns like profit margins, and dodge the integer-division trap.
Intermediate
- 6. Aggregate functions (COUNT, SUM, AVG)FreeTurn many rows into one answer: how many, how much, on average, the smallest and the largest.
- 7. GROUP BY and HAVINGFreeCompute totals per category, per customer or per month, and filter groups with HAVING.
- 8. Aliases and CASE expressionsFreeName things clearly, label rows with if/then logic, and count several things in one pass with conditional aggregation.
- 9. INNER JOINProCombine tables through their keys so an order shows its customer's name and its products, and avoid double counting.
- 10. LEFT / RIGHT / FULL joinsProKeep rows that have no match, find what's missing, join a table to itself, and avoid the WHERE clause that secretly undoes a LEFT JOIN.
- 11. Handling NULLs (COALESCE, IS NULL)ProUnderstand why NULL breaks normal logic, find and replace missing values, and avoid the NOT IN trap and division-by-zero errors.
- 12. Text functions and pattern matching (LIKE, ILIKE)ProSearch text with patterns, clean messy names and emails, and split text into parts.
- 13. Dates and timesProGroup sales by month, measure days between events, filter date ranges safely, and format dates for reports.
Advanced
- 14. SubqueriesProUse the answer of one query inside another, with IN, EXISTS, correlated subqueries and derived tables.
- 15. Common Table Expressions (WITH)ProBreak big queries into named, readable steps, and walk hierarchies with recursive CTEs.
- 16. Window functions (ROW_NUMBER, RANK, running totals)ProRank rows, compute running totals and month-over-month changes, and pick the top N per group, all without losing rows.
- 17. Combining results: UNION, INTERSECT, EXCEPTProStack query results on top of each other, and find what two lists share or what one has that the other doesn't.
- 18. Creating tables, data types, and constraintsProDesign tables that refuse bad data, with the right types, primary and foreign keys, NOT NULL, UNIQUE, CHECK and defaults.
- 19. INSERT, UPDATE, DELETEProAdd, change and remove rows safely, return what changed, and upsert with ON CONFLICT.
Expert
- 20. Indexes and reading a query plan (EXPLAIN)ProLearn how the database finds rows fast, read EXPLAIN output, and write queries that can use indexes.
- 21. Transactions, normalization, and schema designProMake multi-step changes all-or-nothing, spot badly designed tables, and design a clean schema from scratch.
Track project
- SQL Project: Toko Kita's reporting queriesProThree graded queries on the shop's real database. Find the best customers for a thank-you campaign, build a monthly revenue report with a running total, and write the restock report the warehouse checks every Monday.
Pro modules unlock with one payment of Rp 149.000, yours to keep.