CREATE TABLE has_amenity (dormid VARCHAR2, amenid VARCHAR2)
CREATE TABLE dorm (dorm_name VARCHAR2, dormid VARCHAR2)
CREATE TABLE dorm_amenity (amenid VARCHAR2, amenity_name VARCHAR2)

Find the name of dorms which have TV Lounge but no Study Room as amenity.
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'
SELECT "T1"."dorm_name" FROM "dorm" "T1" JOIN "has_amenity" "T2" ON "T1"."dormid" = "T2"."dormid" JOIN "dorm_amenity" "T3" ON "T2"."amenid" = "T3"."amenid" AND "T3"."amenity_name" = 'TV Lounge' EXCEPT SELECT "T1"."dorm_name" FROM "dorm" "T1" JOIN "has_amenity" "T2" ON "T1"."dormid" = "T2"."dormid" JOIN "dorm_amenity" "T3" ON "T2"."amenid" = "T3"."amenid" AND "T3"."amenity_name" = 'Study Room'