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
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')
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 the name of different colleges involved in the tryout in alphabetical order.
assistant
SELECT DISTINCT cName FROM tryout ORDER BY cName
human
What is the total enrollment number of all colleges?
assistant
SELECT sum(enr) FROM College
human
List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.
assistant
SELECT cName FROM College WHERE enr > 18000 ORDER BY cName
human
List all information about college sorted by enrollment number in the ascending order.
assistant
SELECT * FROM College ORDER BY enr ;