-
Notifications
You must be signed in to change notification settings - Fork 222
Description
Description:
The current gold SQL query for the given question uses a subquery, which is unnecessary. Instead, a JOIN due to the gold SQL does not fully align with the question's intent, as it asks for the number of concerts that happened, but the current query only counts concerts without ensuring they actually occurred.
Question:
Find the number of concerts happened in the stadium with the highest capacity.
Database: concert_singer
Current Gold SQL:
SELECT COUNT(*)
FROM concert
WHERE stadium_id = (SELECT stadium_id FROM stadium ORDER BY capacity DESC LIMIT 1);
Suggested Correction:
SELECT * FROM concert AS T1 JOIN stadium AS T2 ON T1.Stadium_ID = T2.Stadium_ID ORDER BY T2.Capacity DESC LIMIT 1
Could anyone confirm if this correction aligns with the intended logic?