Created
October 25, 2010 10:49
-
-
Save mikel/644764 to your computer and use it in GitHub Desktop.
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
I need SQL to turn this: | |
| user_id | question_name | answer | | |
| 1 | 'q1' | 'a' | | |
| 1 | 'q2' | 'b' | | |
| 1 | 'q3' | 'c' | | |
| 2 | 'q1' | 'd' | | |
| 2 | 'q2' | 'e' | | |
| 2 | 'q3' | 'f' | | |
Into this: | |
| user_id | q1 | q2 | q3 | | |
| 1 | 'a' | 'b' | 'c' | | |
| 2 | 'd' | 'e' | 'f' | | |
Obviously the data is a lot more complex, but I need the basic idea to get me started |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment