human
Schema:
College (cName, state, enr)
Player (pID, pName, yCard, HS)
Tryout (pID, cName, pPos, decision)
Please answer with SQL.
assistant
Sure, I understand.
human
What is average enrollment of colleges in the state FL?
assistant
SELECT avg(enr) FROM College WHERE state = 'FL'
human
Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.
assistant
SELECT cName , enr FROM College WHERE enr > 10000 AND state = 'LA'
human
Find the states where have the colleges whose enrollments are less than the largest size.
assistant
SELECT DISTINCT state FROM college WHERE enr < (SELECT max(enr) FROM college)
human
Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.
assistant
SELECT cName FROM College WHERE enr < 13000 AND state = 'AZ' UNION SELECT cName FROM College WHERE enr > 15000 AND state = 'LA'
human
Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.
assistant
SELECT cName FROM college WHERE enr > (SELECT max(enr) FROM college WHERE state = 'FL')
human
Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.
assistant
SELECT DISTINCT cName FROM college WHERE enr > ( SELECT MIN( enr ) FROM college WHERE state = "FL" ) ;