Why this decision matters
SQL is the most-asked technical skill in business analyst job descriptions for a reason — it's the universal language for asking real questions of real data. Most database work boils down to SELECT, and most non-trivial SELECTs need a JOIN. By the end of this topic, "give me a list of X by Y for the period Z" should feel routine, not scary.
By the end of this topic you'll be able to
Write SELECTs with WHERE, GROUP BY, HAVING, and ORDER BY; join 3+ tables with INNER and OUTER joins; write subqueries (correlated and uncorrelated); use CTEs to break complex queries into readable steps; explain the difference between DDL, DML, and TCL.
Materials
Key concepts to know
- SELECT, FROM, WHERE — the basics, mastered.
- GROUP BY & HAVING — aggregation. WHERE filters rows, HAVING filters groups.
- JOINs — INNER, LEFT, RIGHT, FULL, SELF. Pictures help; draw the Venn diagrams.
- Subqueries — a query inside a query. Correlated vs. uncorrelated.
- CTEs (WITH clauses) — readable alternative to nested subqueries.
- DDL · DML · TCL — Data Definition (CREATE/ALTER/DROP), Data Manipulation (SELECT/INSERT/UPDATE/DELETE), Transaction Control (COMMIT/ROLLBACK).
Class notes
- SQL Deep Dive — Subqueries, JOINs, CTEsReference handout for the toughest part of basic SQL.
- GROUP BY BasicsWhen and how to aggregate.
- Understanding the Business FirstFrame the question before you write the query.
Hands-on demo problems & worksheets
- Week 3 — SQL Demo ProblemsWorked examples for class.
- HealthOne DB — SQL Practice ProblemsPractice queries against the HealthOne medical schema.
SQL scripts (set up & explore)
Schemas you can spin up in Oracle APEX, MySQL, or PostgreSQL to practice queries against.
- HealthOneDB.sqlHealthOne schema (generic SQL).
- HealthOneDB_MySQL.sqlMySQL flavor of the HealthOne schema.
- ICA-5 — In-class activity SQL