human
Schema:
basketball_match (Team_ID, School_ID, Team_Name, ACC_Regular_Season, ACC_Percent, ACC_Home, ACC_Road, All_Games, All_Games_Percent, All_Home, All_Road, All_Neutral)
university (School_ID, School, Location, Founded, Affiliation, Enrollment, Nickname, Primary_conference)
Please answer with SQL.
assistant
Sure, I understand.
human
Which schools have participated in a basketball match?
assistant
SELECT School FROM university AS T1 JOIN basketball_match AS T2 ON T1.School_ID = T2.School_ID;
human
How many are there?
assistant
SELECT COUNT( School ) FROM university AS T1 JOIN basketball_match AS T2 ON T1.School_ID = T2.School_ID;
human
How about the schools that have not participated in a basketball match?
assistant
SELECT School FROM university WHERE school_id NOT IN ( SELECT school_id FROM basketball_match );
human
How many are there?
assistant
SELECT COUNT( * ) FROM university WHERE school_id NOT IN ( SELECT school_id FROM basketball_match ) ;