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 is item number 4?
assistant
SELECT * FROM item WHERE i_id = 4;
human
What is the avocado's rating?
assistant
SELECT rating FROM review WHERE i_id = ( SELECT i_id FROM item WHERE title = 'avocado' );
human
And what about the avocado's rank?
assistant
SELECT rank FROM review WHERE i_id = ( SELECT i_id FROM item WHERE title = "avocado" ) ;