SELECT Basics: Columns, SELECT * and Aliases
The statement you will write more than all the others combined. Choose columns, alias them, and learn why SELECT * belongs in the console and not in c...
A complete SQL path: fundamentals, DDL and DML, querying, joins, subqueries, CTEs, window functions, design, indexing, transactions, performance and security.
91 notes in 31 topics
The statement you will write more than all the others combined. Choose columns, alias them, and learn why SELECT * belongs in the console and not in c...
Compute values in the select list, build derived columns from existing ones, and use DISTINCT correctly - including what it does across several column...
Sorting on one or many columns, NULL placement, and the four dialect specific ways to fetch page two of a result set - including why OFFSET gets slow.
WHERE decides which rows survive. Learn the comparison operators, how conditions are evaluated per row, and why a function around a column kills an in...
Combining conditions correctly. Precedence between AND and OR, what NOT does to a NULL, and how to keep complex filters readable and index friendly.
The four filtering shortcuts you will use constantly: set membership, ranges, pattern matching with wildcards, and the only correct way to test for NU...
Concatenating, trimming, slicing, replacing and searching text - and which of these functions changes name in every dialect.
Rounding, truncating, absolute values, modulo and integer division - and the rounding rules that decide whether your invoice totals balance.
Current date and time, adding and subtracting intervals, differences between dates, extracting parts, and formatting - the least portable corner of SQ...
Conditional logic inside a query, NULL substitution, safe division and explicit type conversion - four tools that remove most procedural code from SQL...
NULL is not zero, not an empty string and not equal to itself. Learn what it represents, how it spreads through expressions and how to handle it delib...
SQL conditions return three results, not two. Learn the AND, OR and NOT truth tables, why NOT IN breaks on NULL, and the NULL safe comparison operator...