human
Schema:
candidate (Candidate_ID, People_ID, Poll_Source, Date, Support_rate, Consider_rate, Oppose_rate, Unsure_rate)
people (People_ID, Sex, Name, Date_of_Birth, Height, Weight)
Please answer with SQL.
assistant
Sure, I understand.
human
what is the average uncertain ratio of all candidates?
assistant
SELECT AVG ( unsure_rate ) FROM candidate;
human
what are the numbers for each sex?
assistant
SELECT t1.sex , AVG ( t2.unsure_rate ) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex;
human
which gender got the higher number?
assistant
SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id GROUP BY t1.sex ORDER BY AVG ( t2.unsure_rate ) DESC LIMIT 1 ;