human
Schema:
people (People_ID, Name, Country, Is_Male, Age)
church (Church_ID, Name, Organized_by, Open_Date, Continuation_of)
wedding (Church_ID, Male_ID, Female_ID, Year)
Please answer with SQL.
assistant
Sure, I understand.
human
How many women are there?
assistant
SELECT COUNT( * ) FROM people WHERE is_male = 'F';
human
And men?
assistant
SELECT COUNT( * ) FROM people WHERE is_male = 'T';
human
How many people are there over the age of 30?
assistant
SELECT COUNT( * ) FROM people WHERE age > 30;
human
How many of them are women?
assistant
SELECT COUNT( * ) FROM people WHERE is_male = "F" AND age > 30 ;