human
Schema:
item (i_id, title)
review (a_id, u_id, i_id, rating, rank)
useracct (u_id, name)
trust (source_u_id, target_u_id, trust)
Please answer with SQL.
assistant
Sure, I understand.
human
What are all of the users names?
assistant
SELECT name FROM useracct;
human
How many wrote reviews?
assistant
SELECT COUNT( * ) FROM useracct WHERE u_id IN ( SELECT u_id FROM review );
human
How many did not write reviews?
assistant
SELECT COUNT( * ) FROM useracct WHERE u_id NOT IN ( SELECT u_id FROM review ) ;