I'm trying to transpose my SQL table rows to columns but I need the resulting rows to be created based on the groups in the 'Quiz' column.
I have read threads about transposing rows to columns but since what I'm trying to achieve involves grouping a column and I need to use all values in the 'Score' column, I can't figure out how to achieve my desired outcome.
Original table:
Quiz | Name | Score
---------------------------
A | Andy | 10
A | Drew | 8
A | Mark | 7
A | Samm | 6
B | Andy | 9
B | Drew | 7
B | Mark | 7
B | Samm | 9
Query result:
Quiz | Andy | Drew | Mark | Samm
-----------------------------------------
A | 10 | 8 | 7 | 6
B | 9 | 7 | 7 | 9
Any help is highly appreciated.