The shorthand operators
Four operators that turn long, ugly conditions into short, readable ones. Memorise the syntax once; you'll use them daily.
DISTINCT — kill duplicates
SELECT DISTINCT category FROM products returns each category once. SELECT DISTINCT a, b FROM t returns each unique combination. COUNT(DISTINCT col) counts unique values.
IN, BETWEEN, LIKE/ILIKE
IN (a, b, c) is shorthand for = a OR = b OR = c, plus subquery support. BETWEEN x AND y is inclusive on both ends. LIKE uses % (zero or more chars) and _ (one char); ILIKE is case-insensitive (PostgreSQL extension).