How many swimming records are there in the system?
select count(*) from record
What about swimming records of a result Win?
select count(*) from record where result = 'Win'
What about in terms of swimmer ids?
select swimmer_id, count(*) from record where result = 'Win' group by swimmer_id
Show me those with more than one.
select swimmer_id from record where result = 'Win' group by swimmer_id having count(*) > 1
Show me their names and nationalities.
select t1.name, t1.nationality from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'Win' group by t2.swimmer_id having count(*) > 1