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
What are the ids of the males who had a wedding?
assistant
SELECT male_id FROM wedding;
human
Show all the male people who have not had a wedding.
assistant
SELECT * FROM people WHERE is_male = 'T' AND people_id NOT IN ( SELECT male_id FROM wedding );
human
What are their names and ages?
assistant
SELECT name , age FROM people WHERE is_male = "T" AND people_id NOT IN ( SELECT male_id FROM wedding ) ;