I really don't know how to do this, but please kindly check the details below.
Student
|Student_ID|Student_Name| |1 |Ryan | |2 |Camille | |3 |George |
the class
|Student_ID|Subject |Grade |1 |Math |5 |1 |English |3 |1 |History |1 |2 |Math |3 |2 |English |4 |2 |History |1 |3 |Math |5 |3 |English |1 |3 |History |2
Is it possible to get this result?
Student_Name|Math|English|History Ryan |5 |3 |1 Camille |3 |4 |1 George |5 |1 |2
Now I am doing this in hardcover, filling in an unrelated datagrid with the first column name, then the student name, and then adding details for each student name. This takes a lot of time, and I want to optimize the query better.
Thanks in advance.
source share