I have three MySql tables:
Students - StudentId, StudentName
Assessments - AssessmentId, AssessmentName
Results - StudentId, AssessmentId, Grade
I can't predetermine the number of students or assessments, as these are created by users.
How can I select a two-way table, showing the results of all students' assessments (which will have an unpredetermined number of rows and columns):
|--------|---------|---------|---------|---------|---------|
|User |Test A |Test B |Test C |Test D |Test E |
|--------|---------|---------|---------|---------|---------|
|Alex |A |A |C |Null |F |
|Ben |Null |D |A |Null |Null |
|--------|---------|---------|---------|---------|---------|
I am looking to do this either in a SQL select, or using LINQ to Entities in ASP.NET, if that has an efficient method for achieving the same.
Thank you.