Skip to content

Instantly share code, notes, and snippets.

@xrd
Created July 19, 2012 12:52
Show Gist options
  • Select an option

  • Save xrd/3143616 to your computer and use it in GitHub Desktop.

Select an option

Save xrd/3143616 to your computer and use it in GitHub Desktop.
Table A
id name
-- ----
55 Bob
Table B
value a_id c_id
---- ---- ----
green 55 88
acura 55 77
Table C
id key
-- ----------------
88 "favorite color"
77 "favorite car"
I want to generate CSV from this using SQL that results in this:
id, name, favorite color, favorite car
55, Bob, green, acura
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment