human
Schema:
city (City_ID, Official_Name, Status, Area_km_2, Population, Census_Ranking)
farm (Farm_ID, Year, Total_Horses, Working_Horses, Total_Cattle, Oxen, Bulls, Cows, Pigs, Sheep_and_Goats)
farm_competition (Competition_ID, Year, Theme, Host_city_ID, Hosts)
competition_record (Competition_ID, Farm_ID, Rank)
Please answer with SQL.
assistant
Sure, I understand.
human
Out of all the farms, what are the maximum and minimum numbers of cows?
assistant
SELECT MAX( Cows ) , MIN( Cows ) FROM farm;
human
And for horses? | Do you mean total horses or working horses? | total horses
assistant
SELECT MAX( Total_Horses ) , MIN( Total_Horses ) FROM farm;
human
How many more oxen are there than cattle on farm id 1
assistant
SELECT oxen , total_cattle FROM farm WHERE farm_id = 1 ;