human
Schema:
college (College_ID, Name, Leader_Name, College_Location)
member (Member_ID, Name, Country, College_ID)
round (Round_ID, Member_ID, Decoration_Theme, Rank_in_Round)
Please answer with SQL.
assistant
Sure, I understand.
human
How many different rounds are there?
assistant
SELECT COUNT( DISTINCT round_id ) FROM round;
human
What are they?
assistant
SELECT DISTINCT round_id FROM round;
human
For each, who are the names of the members with ranks in rounds lower than 3?
assistant
SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID = T2.Member_ID WHERE T2.Rank_in_Round < 3 ;