Database: soccer_2

Question: How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?
SQL: SELECT DISTINCT T1.state ,  T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes'

Question: What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?
SQL: SELECT cName FROM College WHERE enr  <  13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr  >  15000 AND state = "LA"

Question: What are the names of all schools that have students trying out for the position of goal and 'mid'-field.
SQL: SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid'

Question: What are the names of the states that have some college students playing in the positions of goalie and mid-field?
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid'

Question: How many schools have students playing in goalie and mid-field positions?
SQL: SELECT COUNT(*) FROM (SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid')

Question: What are the names of the schools with some players in the mid position but no goalies?
SQL: SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie'

Question: What are the names of all the states with college students playing in the mid position but no goalies?
SQL: SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie'

Question: What is the count of states with college students playing in the mid position but not as goalies?
SQL: SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie')

Question: What are the names of all colleges with a larger enrollment than the largest college in Florida?
SQL: SELECT cName FROM college WHERE enr  >  (SELECT max(enr) FROM college WHERE state  =  'FL')

Question: What is the total number of students enrolled in schools without any goalies?
SQL: SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie")

Question: How many states have a college with more students than average?
SQL: SELECT count(DISTINCT state) FROM college WHERE enr  >  (SELECT avg(enr) FROM college)

Question: How many states have smaller colleges than average?
SQL: SELECT count(DISTINCT state) FROM college WHERE enr  <  (SELECT avg(enr) FROM college)