Write a query that returns
student_id and a correlated subquery that returns the matching average group-wise
parental_education category. Alias the result of the correlated subquery as
SELECT student_id, (SELECT AVG(writing_score) from performance p1 where p1.parental_education = p2.parental_education group by parental_education) as parental_education_avg_writing from performance p2;
Why do we need to equate p1.parental_education = p2.parental_education ?
Trying to understand the logic.