Skip to content

Instantly share code, notes, and snippets.

View iampatgrady's full-sized avatar
🎯
Thinking about data challenges

iampatgrady

🎯
Thinking about data challenges
View GitHub Profile
@iampatgrady
iampatgrady / all_join_types.sql
Created August 23, 2018 18:05 — forked from zjuul/all_join_types.sql
SQL joins: all in one
-- create two tables: L and R
-- content of tables a "val" column with two rows.
-- rows in L: "left only" and "both"
-- rows in R: "right only" and "both"
with l as (
select 'both' as val
union
select 'left_only' as val
), r as (