daily pastebin goal
21%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 65 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. I need SQL to turn this:
  2.  
  3.  | user_id | question_name  | answer |
  4.  | 1       | 'q1'           | 'a'    |
  5.  | 1       | 'q2'           | 'b'    |
  6.  | 1       | 'q3'           | 'c'    |
  7.  | 2       | 'q1'           | 'd'    |
  8.  | 2       | 'q2'           | 'e'    |
  9.  | 2       | 'q3'           | 'f'    |
  10.  
  11. Into this:
  12.  
  13.  | user_id | q1  | q2  | q3  |
  14.  | 1       | 'a' | 'b' | 'c' |
  15.  | 2       | 'd' | 'e' | 'f' |
  16.  
  17. Obviously the data is a lot more complex, but I need the basic idea to get me started
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top