Question: Find the names of the swimmers who have both "win" and "loss" results in the record.
Schema: create table record (swimmer_id varchar, PRIMARY KEY (swimmer_id)); create table swimmer (name varchar, id varchar, PRIMARY KEY (name))
SQL: select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'win' intersect select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'loss'