Last active
November 5, 2022 21:46
-
-
Save cnstlungu/eb6d68314f7a799fd781933a991c83ca to your computer and use it in GitHub Desktop.
Use consistent indentantion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
column1, | |
column2, | |
CASE | |
WHEN column2 = 'event' THEN TRUE | |
ELSE FALSE | |
END AS is_event, | |
SUM(column3) AS total_value | |
FROM | |
table1 t1 | |
JOIN | |
table2 t2 ON t1.column1 = t2.column2 | |
GROUP BY | |
t1.column1, t2.column2 | |
ORDER BY | |
column1, column2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment