Schema: CREATE TABLE Likes (student_id VARCHAR, liked_id VARCHAR); CREATE TABLE Friend (student_id VARCHAR, liked_id VARCHAR)
Question: Show the ids of high schoolers who have friends and are also liked by someone else.
SQL: SELECT student_id FROM Friend INTERSECT SELECT liked_id FROM Likes