Screen Link:
My Code:
SELECT performance.*, parental_edu_reading_avg
FROM performance
JOIN(
SELECT student_id,parental_education,AVG(reading_score) as parental_edu_reading_avg
FROM performance
GROUP BY parental_education) as p
ON performance.student_id=p.student_id
Ques- Write a query that joins the performance
table to an aggregated table containing each of the reading_score
averages among each parental_education
category.
Expected the solution to work. But it is failing because of the join condition. I am unable to know why the join condition is wrong.