-- Database schema
| Highschooler : ID [ INT ] primary_key , name [ TEXT ] , grade [ INT ] | Friend : student_id [ INT ] primary_key Friend.student_id = Highschooler.ID , friend_id [ INT ] Friend.friend_id = Highschooler.ID | Likes : student_id [ INT ] primary_key Likes.student_id = Highschooler.ID , liked_id [ INT ] Likes.liked_id = Highschooler.ID |
-- -- Show name of all students who have some friends and also are liked by someone else.

SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id  =  T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id  =  T2.id;