Jimbo99999
asked on
SQL Query Roll-up Rows That Are Inside Rows
Good Day Experts!
I have been tasked with another assignment that I need some help with. Hopefully you can point me in the right direction.
I have a list of students that each have 4 classes. So far we have made it through 3 quarters. However, the student could have moved here at the start of the second quarter so would only have 2 quarters in the books. When the class changes, I have to avg the grade percentage for as many quarters as the student was enrolled. All of the class grade percentages need to be on one line per student. I have attached a file to try and make it clearer for what I am trying to achieve.
What is the best way to approach this?
Thank for the help,
jimbo99999
EE.xlsx
I have been tasked with another assignment that I need some help with. Hopefully you can point me in the right direction.
I have a list of students that each have 4 classes. So far we have made it through 3 quarters. However, the student could have moved here at the start of the second quarter so would only have 2 quarters in the books. When the class changes, I have to avg the grade percentage for as many quarters as the student was enrolled. All of the class grade percentages need to be on one line per student. I have attached a file to try and make it clearer for what I am trying to achieve.
What is the best way to approach this?
Thank for the help,
jimbo99999
EE.xlsx
ASKER
Hello...thank you for your response. I have to do this in a SQL Query/Stored Procedure.
I apologize for the confusion on the VisualBasic.Net category. I was just trying to perhaps get some input from a wider range of experts.
Thanks,
Ed
I apologize for the confusion on the VisualBasic.Net category. I was just trying to perhaps get some input from a wider range of experts.
Thanks,
Ed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you for the direction on using Pivot. I will study it now and implement into my structure.
ASKER
Thank you for the help. I was able to get it working!
Step 2: Depends on your requirements. As you post is tagged VisualBasic.NET, I would do the pivoting in the frond-end.