-- Database schema
| Student : StuID [ INT ] primary_key , LName [ TEXT ] , Fname [ TEXT ] , Age [ INT ] , Sex [ TEXT ] , Major [ INT ] , Advisor [ INT ] , city_code [ TEXT ] | Dorm : dormid [ INT ] , dorm_name [ TEXT ] , student_capacity [ INT ] , gender [ TEXT ] | Dorm_amenity : amenid [ INT ] , amenity_name [ TEXT ] | Has_amenity : dormid [ INT ] Has_amenity.dormid = Dorm.dormid , amenid [ INT ] Has_amenity.amenid = Dorm_amenity.amenid | Lives_in : stuid [ INT ] Lives_in.stuid = Student.StuID , dormid [ INT ] Lives_in.dormid = Dorm.dormid , room_number [ INT ] |
-- -- What are the first and last names of all students who are living in a dorm with a TV Lounge?

SELECT T1.fname ,  T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid  =  T4.amenid WHERE T4.amenity_name  =  'TV Lounge');