Snatch any course you want for just $15! Go to “Courses” and find a course ↓
Introduction
Inserting and updating NULLs
Conditions in UPDATE and DELETE
Using values from another column
Inserting data from a query
14. INSERT INTO ... SELECT with GROUP BY
Summary

Instruction

Great! Now try to insert data using INSERT INTO ... SELECT with GROUP BY.

Exercise

This time, the university needs a list of average results of written and oral exams in each subject (from the exam table).

The new table, report_average_scores consists of the following columns: subject, avg_written_exam_score, and avg_oral_exam_score (which are of type DECIMAL(4,2)).

Help the university insert data into the report_average_scores table.