human
Schema:
county (County_Id, County_name, Population, Zip_code)
party (Party_ID, Year, Party, Governor, Lieutenant_Governor, Comptroller, Attorney_General, US_Senate)
election (Election_ID, Counties_Represented, District, Delegate, Party, First_Elected, Committee)
Please answer with SQL.
assistant
Sure, I understand.
human
Could you list the names of all counties in ascending alphabetical order?
assistant
SELECT County_name FROM county ORDER by County_name;
human
How many delegates do each of these counties have?
assistant
SELECT T1.County_name , COUNT( * ) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id ;