Outcomes
- • Read table structure confidently and select only relevant columns.
- • Write predictable, reproducible queries with explicit sorting.
- • Adopt clean SQL formatting and aliasing habits from day one.
Write your first real queries — pick columns, filter rows, sort results, and limit output. The four moves you will use in every query you ever write.
Professional learning blueprint
Outcomes
Real-world use
Fast study plan
Deep learning journey
Build deterministic query habits and clean output structure before adding complexity.
Understand clause order and readable query flow.
Return exactly what business stakeholders need.
Guarantee reproducible, review-friendly result sets.
Bonus lesson units
1. Type casting and data conversion
Cast values with :: and CAST() — integer, numeric, text, date, and boolean conversions.
2. String manipulation functions
Use UPPER, LOWER, CONCAT, SUBSTRING, TRIM, REPLACE, and SPLIT_PART for data cleaning.
3. Arithmetic and math functions
Apply ROUND, FLOOR, CEIL, ABS, POWER, and SQRT to build computed columns in reports.
Expanded practice
1. Executive employee list
easyReturn first_name, last_name, salary from employees with explicit ORDER BY and LIMIT 20.
2. Column precision drill
easyReturn exactly 4 requested columns from employees and rename two with business aliases.
3. Deterministic top earners
mediumReturn top 15 salaries with tie-break order by employee_id.
4. Unique department list
easyReturn distinct department_id values sorted ascending.
5. Clean contact extract
mediumReturn employee contact columns and normalize output column names with aliases.
6. Reproducible paging
mediumReturn rows 21-40 using LIMIT/OFFSET with stable ordering.
7. Salary band snapshot
mediumReturn employees with salary, plus a derived salary_band CASE expression.
8. QA preview view
easyBuild a compact preview query that verifies table shape and data quality.
9. Sort audit
hardDemonstrate two different deterministic ordering strategies and compare outputs.
10. Readable SQL rewrite
mediumRefactor a messy SELECT into clean formatting with clear aliases.
Study references
Learn to read data from a database — the skill everything else in SQL builds on. By the end you will know how to write any single-table query with confidence.
SELECT specific columns (or * for all)WHERE and comparison operators (=, <>, <, >, BETWEEN)ORDER BY — ascending and descendingLIMIT and skip rows with OFFSETDISTINCTASAll exercises run against the HR database — a company with employees, departments, jobs, and salary history. You'll answer questions like "list the five highest-paid employees" and "find everyone hired before 2010."
None. This is the starting point — no SQL experience required.