Hello SQL expert,
Below are my sql query and the result set.
I am trying to make my result set to single row for every Student and combine their scores.
My query:
SELECT DISTINCT Student_Name, Student_ID, Class, Score
FROM StudentTbl
Default result set:
Student_Name Student_Id Class Score
Sabrina Davis SDT2354 A 75
Sabrina Davis SDT2354 A 60
Sabrina Davis SDT2354 A 89
Andy Hills SDT3588 F 99
Steve Collins SDT3354 G 100
Steve Collins SDT3354 G 95
Steve Collins SDT3354 G 80
Amy Dillon SDT3567 T 77
Amy Dillon SDT3567 T 80
Amy Dillon SDT3567 T 91
Result I am trying to achieve:
Student_Name Student_Id Class Score
Sabrina Davis SDT2354 A 75,60,89
Andy Hills SDT3588 F 99
Steve Collins SDT3354 G 100,95,80
Amy Dillon SDT3567 T 77,80,91
How do I update my above query? Anyone? Thanks all!