here is the schema:
here is the question:
Point out the battles in which at least three ships from the same country took part.
here is my answer:
SELECT battles.name
FROM battles,
outcomes,
ships,
classes
WHERE outcomes.ship = ships.name
GROUP BY battles.name
HAVING COUNT(classes.country) >= 3;
Can you please tell me why it is wrong and help me to correct it!