There is a table:
- disciplines: id, name;
- marks: id, s_id, d_id, t_id, value;
It is necessary to create a related subquery for sampling the names of disciplines, the average score for which is higher than 3. In general, I haven’t been told anything, there is little information on the Internet, but I have found something. It turns out the internal query will compare each of the average values of disciplines with a rating table with 3:
SELECT name FROM disciplines WHERE 3 < (SELECT AVG(value) FROM marks WHERE marks.d_id = disciplines.id GROUP BY marks.d_id); The request seems to be correct (the correct answer is displayed), but for some reason I doubt it. Please answer if it is correct.