Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
Add Comment
Please, Sign In to add comment