I need help with a query, I want to group result rows by first two columns and I have no idea how to proceed.
My query
SELECT student_number, homework_name, homework_points
FROM student, homework
WHERE student.studentid = homework.studentid
Below are my query results
student_number homework_name homework_points
-------------- ------------- ---------------
7554 Homework 1 22.5
7554 Homework 2 16.0
7677 Homework 1 36.0
7677 Homework 2 14.5
How would I go about transforming the query to get results like this
student_number Homework 1 Homework 2
-------------- ------------- ---------------
7554 22.5 16.0
7677 36.0 14.5
Any help would be greatly appreciated.
Thanks!