human
Schema:
swimmer (ID, name, Nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, Time)
stadium (ID, name, Capacity, City, Country, Opening_year)
event (ID, Name, Stadium_ID, Year)
record (ID, Result, Swimmer_ID, Event_ID)
Please answer with SQL.
assistant
Sure, I understand.
human
How many swimmers are there in record?
assistant
SELECT COUNT( * ) FROM swimmer;
human
What about in terms of nationality?
assistant
SELECT nationality , COUNT( * ) FROM swimmer GROUP BY nationality;
human
Show me the countries with more than one.
assistant
SELECT nationality , COUNT( * ) FROM swimmer GROUP BY nationality HAVING COUNT( * ) > 1 ;