How to merge rows into single row in SQL?
ex: SELECT distinct studentID, studentName, MathGrade, SciGrade from vStudentGrade;
output:
StudentID studentName MathGrade SciGrade
1 Zed 89
1 Zed 98
desired output:
StudentID studentName MatheGrade SciGrade
1 Zed 89 98
I wonder what criteria you’re using to group them. I’m assuming there always be NULL values and a number… because that matches de example, but more detail would be better!
Hope this helps or guide you to a solution 🙂