1. Foundations of SELECT
SQL, or Structured Query Language, is the standard language for querying and manipulating relational data. At its core, every data-retrieval query begins with the SELECT statement,...
Read full chapter →The essential SQL For Data Analysis cheat sheet: 7 concise chapters you can read in minutes, distilled from the full deck. When you're ready, drill the flashcards or test yourself under exam conditions.
SQL, or Structured Query Language, is the standard language for querying and manipulating relational data. At its core, every data-retrieval query begins with the SELECT statement,...
Read full chapter →Joins are how you combine rows from multiple related tables, and choosing the right join type determines which rows appear in the output. An INNER JOIN returns only rows with match...
Read full chapter →Aggregation compresses many rows into summary values. The standard aggregate functions are COUNT, SUM, AVG, MIN, and MAX; COUNT totals the number of rows (or non-NULL values in a s...
Read full chapter →Window functions perform calculations across a set of rows that are related to the current row, but unlike aggregates they do not collapse the result set — every input row still ap...
Read full chapter →A subquery is a query nested inside another query — in SELECT, FROM, WHERE, or HAVING — and provides a way to compute a value or set of values that the outer query then uses. A non...
Read full chapter →Beyond the basic comparison operators, SQL offers specialized tools for working with strings, ranges, and conditional logic. The LIKE operator performs pattern matching on string c...
Read full chapter →Indexes are data structures — typically B-trees — that speed up lookups at the cost of additional storage and slower writes. A clustered index determines the physical order of data...
Read full chapter →Done reading?
Test yourself with the SQL For Data Analysis practice exam — timed questions, instant score, full review of wrong answers. Free.
🎯 Take the Practice Exam →