Learn 2/60: SQL Intermediate
- CASE statement
- Distinct
If you include two (or more) columns in a SELECT DISTINCT clause, your results will contain all of the unique pairs of those two columns.
- Union and Union ALL, Union will remove all the duplicates whereas UNIONALL will keep dups.
- CAST(column_name AS integer)
- Date functions:
companies.founded_at_clean::timestamp +
INTERVAL '1 week
- Window functions like PARTITION, LEAD, LAG, NTILE
Next: String functions & Date functions, Indexing, Remaining window function
- Distinct
If you include two (or more) columns in a SELECT DISTINCT clause, your results will contain all of the unique pairs of those two columns.
- Union and Union ALL, Union will remove all the duplicates whereas UNIONALL will keep dups.
- CAST(column_name AS integer)
- Date functions:
companies.founded_at_clean::timestamp +
INTERVAL '1 week
- Window functions like PARTITION, LEAD, LAG, NTILE
Next: String functions & Date functions, Indexing, Remaining window function