Learning to write sql queries and facing some issues.
The query:
SELECT * FROM competitions c INNER JOIN ( SELECT competitionId, SUM(quantity) AS