Skip to content

Instantly share code, notes, and snippets.

@masnick
Created August 7, 2015 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masnick/c60a4b82dccb7c055d19 to your computer and use it in GitHub Desktop.
Save masnick/c60a4b82dccb7c055d19 to your computer and use it in GitHub Desktop.
Cross join results table
friend_id friend_name pet_id owner_id pet_type pet_name
1 John 1 1 goldfish Fishy
2 Sarah 1 1 goldfish Fishy
3 Rachel 1 1 goldfish Fishy
4 Sam 1 1 goldfish Fishy
1 John 2 1 goldfish Nemo
2 Sarah 2 1 goldfish Nemo
3 Rachel 2 1 goldfish Nemo
4 Sam 2 1 goldfish Nemo
1 John 3 1 dog Fido
2 Sarah 3 1 dog Fido
3 Rachel 3 1 dog Fido
4 Sam 3 1 dog Fido
1 John 4 2 cat Kitty
2 Sarah 4 2 cat Kitty
3 Rachel 4 2 cat Kitty
4 Sam 4 2 cat Kitty
1 John 5 2 bird Feathers
2 Sarah 5 2 bird Feathers
3 Rachel 5 2 bird Feathers
4 Sam 5 2 bird Feathers
1 John 6 3 chinchilla Fuzzy
2 Sarah 6 3 chinchilla Fuzzy
3 Rachel 6 3 chinchilla Fuzzy
4 Sam 6 3 chinchilla Fuzzy
1 John 7 (null) iguana Scales
2 Sarah 7 (null) iguana Scales
3 Rachel 7 (null) iguana Scales
4 Sam 7 (null) iguana Scales
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment