Last active
October 11, 2021 08:10
-
-
Save Paulescu/5d2ddc85106da901ae8373b40eb5b69a to your computer and use it in GitHub Desktop.
hard.sql
This file contains hidden or 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
| -- SQL query you end up writing | |
| WITH table1 AS ( | |
| SELECT ... | |
| FROM ... | |
| GROUP BY ... | |
| ) | |
| ,table2 AS ( | |
| SELECT ... | |
| FROM ... | |
| GROUP BY ... | |
| ) | |
| ,table3 AS ( | |
| SELECT ... | |
| FROM ... | |
| ) | |
| SELECT | |
| feature1, | |
| feature2, | |
| ... | |
| featureN, | |
| target | |
| FROM | |
| table1 | |
| INNER JOIN table2 | |
| LEFT JOIN table3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment