Track T30
SQL for Analysts
DuckDB SQL from first query to window functions.
Unit 1Reading tables
- 1Your first queryRead a table with SELECT, FROM and LIMIT, name what you compute, and use the SQL page's Tables list so you never mistype a table.
- 2Filtering rows with WHEREKeep the rows you mean with WHERE, combine conditions, and learn why comparing with NULL finds nothing.
- 3Sorting, top N and DISTINCTOrder rows, take the top few, handle ties and missing values, and list a column's distinct values.
Unit 2Summarizing
Unit 3Combining tables
- 6Joining tablesCombine two tables on a key, choose what happens to rows with no match, and find them.
- 7When a join multiplies your rowsA key that isn't unique multiplies rows, and every total and average after it is wrong with no error. Learn to spot it and prevent it.
- 8Building up with WITHName intermediate results with WITH so a long query reads top to bottom, and use a subquery where a single number will do.
Unit 4Over rows and time
Unit 5Keep it honest
- 11Checking data with SQLWrite the queries that catch duplicates, coded values and inconsistent categories, turn them into data checks that keep watching, and add or export the checks the profile suggests.
- 12From a query to something that lastsParameterize a query, read its plan, save it, and promote it to a dataset, a notebook or a SQL model with tests and lineage.