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
for which user id rating is high | did you mean for which user id is the rating highest? | ok, find user id who gives the rating 10
assistant
SELECT T1.u_id FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id WHERE T2.rating = 10;
human
find the name of the user who gives most reviews
assistant
SELECT T1.name FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY COUNT( * ) DESC LIMIT 1 ;