Skip to content

Instantly share code, notes, and snippets.

@amdevine
amdevine / dc-sql-cheat-sheet.md
Last active November 23, 2020 02:51
Data Carpentry SQL Cheat Sheet

Data Carpentry - SQL Cheat Sheet

Query order of operations

SELECT tablea.column1, tablea.column2, tableb.column3 AS somealias, SUM(tableb.column4)
FROM tablea
LEFT JOIN tableb
ON tablea.columnx = tableb.columnx
WHERE (tablea.column1 = 'someString') AND (tablea.column2 = someNumber)