-- Truncate room_roomtypes table to start fresh
TRUNCATE TABLE room_roomtypes;

-- Insert room to roomtype mappings based on roomtypes.csv
-- Each room gets mapped to its primary room type, and some rooms also get a secondary type
-- Only insert for rooms that actually exist in the rooms table
INSERT INTO room_roomtypes (room_id, roomtype_id)
SELECT t.room_id, t.roomtype_id
FROM (VALUES
    (1, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (2, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (3, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (4, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (5, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (6, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (7, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (8, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (9, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (10, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (11, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (12, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (13, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (14, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (15, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (16, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (17, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (18, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (19, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (20, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (21, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (22, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (23, (SELECT id FROM roomtypes WHERE name = 'office')),
    (24, (SELECT id FROM roomtypes WHERE name = 'office')),
    (25, (SELECT id FROM roomtypes WHERE name = 'office')),
    (26, (SELECT id FROM roomtypes WHERE name = 'office')),
    (27, (SELECT id FROM roomtypes WHERE name = 'office')),
    (28, (SELECT id FROM roomtypes WHERE name = 'office')),
    (29, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (30, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (31, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (32, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (33, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (34, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (35, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (36, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (37, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (38, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (39, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (40, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (41, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (42, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (43, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (44, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (45, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (46, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (47, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (48, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (49, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (50, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (51, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (52, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (53, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (54, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (55, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (56, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (57, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (58, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (59, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (60, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (61, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (62, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (63, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (64, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (65, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (66, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (67, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (68, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (69, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (70, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (71, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (72, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (73, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (74, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (75, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (76, (SELECT id FROM roomtypes WHERE name = 'office')),
    (77, (SELECT id FROM roomtypes WHERE name = 'office')),
    (78, (SELECT id FROM roomtypes WHERE name = 'office')),
    (79, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (80, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (81, (SELECT id FROM roomtypes WHERE name = 'office')),
    (82, (SELECT id FROM roomtypes WHERE name = 'office')),
    (83, (SELECT id FROM roomtypes WHERE name = 'office')),
    (84, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (85, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (86, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (87, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (88, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (89, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (90, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (91, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (92, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (93, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (94, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (95, (SELECT id FROM roomtypes WHERE name = 'office')),
    (96, (SELECT id FROM roomtypes WHERE name = 'office')),
    (97, (SELECT id FROM roomtypes WHERE name = 'office')),
    (98, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (99, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (100, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (101, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (102, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (103, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (104, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (105, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (106, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (107, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (108, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (109, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (110, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (111, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (112, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (113, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (114, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (115, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (116, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (117, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (118, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (119, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (120, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (121, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (122, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (123, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (124, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (125, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (126, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (127, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (128, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (129, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (130, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (131, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (132, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (133, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (134, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (135, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (136, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (137, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (138, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (139, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (140, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (141, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (142, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (143, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (144, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (145, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (146, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (147, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (148, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (149, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (150, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (151, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (152, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (153, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (154, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (155, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (156, (SELECT id FROM roomtypes WHERE name = 'office')),
    (157, (SELECT id FROM roomtypes WHERE name = 'office')),
    (158, (SELECT id FROM roomtypes WHERE name = 'office')),
    (159, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (160, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (161, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (162, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (163, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (164, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (165, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (166, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (167, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (168, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (169, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (170, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (171, (SELECT id FROM roomtypes WHERE name = 'office')),
    (172, (SELECT id FROM roomtypes WHERE name = 'office')),
    (173, (SELECT id FROM roomtypes WHERE name = 'office')),
    (174, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (175, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (176, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (177, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (178, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (179, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (180, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (181, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (182, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (183, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (184, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (185, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (186, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (187, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (188, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (189, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (190, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (191, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (192, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (193, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (194, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (195, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (196, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (197, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (198, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (199, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (200, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (201, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (202, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (203, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (204, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (205, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (206, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (207, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (208, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (209, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (210, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (211, (SELECT id FROM roomtypes WHERE name = 'office')),
    (212, (SELECT id FROM roomtypes WHERE name = 'office')),
    (213, (SELECT id FROM roomtypes WHERE name = 'office')),
    (214, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (215, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (216, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (217, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (218, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (219, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (220, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (221, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (222, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (223, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (224, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (225, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (226, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (227, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (228, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (229, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (230, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (231, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (232, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (233, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (234, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (235, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (236, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (237, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (238, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (239, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (240, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (241, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (242, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (243, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (244, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (245, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (246, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (247, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (248, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (249, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (250, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (251, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (252, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (253, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (254, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (255, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (256, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (257, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (258, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (259, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (260, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (261, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (262, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (263, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (264, (SELECT id FROM roomtypes WHERE name = 'office')),
    (265, (SELECT id FROM roomtypes WHERE name = 'office')),
    (266, (SELECT id FROM roomtypes WHERE name = 'office')),
    (267, (SELECT id FROM roomtypes WHERE name = 'office')),
    (268, (SELECT id FROM roomtypes WHERE name = 'office')),
    (269, (SELECT id FROM roomtypes WHERE name = 'office')),
    (270, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (271, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (272, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (273, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (274, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (275, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (276, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (277, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (278, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (279, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (280, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (281, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (282, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (283, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (283, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (284, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (284, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (285, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (285, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (286, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (286, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (287, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (287, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (288, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (288, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (289, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (289, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (290, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (290, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (291, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (291, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (292, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (292, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (293, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (293, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (294, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (294, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (295, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (296, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (297, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (298, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (299, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (300, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (301, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (302, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (303, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (304, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (305, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (306, (SELECT id FROM roomtypes WHERE name = 'baby-room')),
    (307, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (308, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (309, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (310, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (311, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (312, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (312, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (313, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (314, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (315, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (316, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (317, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (318, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (319, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (320, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (321, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (322, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (322, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (323, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (323, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (324, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (324, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (325, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (325, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (326, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (326, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (327, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (327, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (328, (SELECT id FROM roomtypes WHERE name = 'hallway')),
    (329, (SELECT id FROM roomtypes WHERE name = 'office')),
    (330, (SELECT id FROM roomtypes WHERE name = 'office')),
    (330, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (331, (SELECT id FROM roomtypes WHERE name = 'office')),
    (332, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (333, (SELECT id FROM roomtypes WHERE name = 'kitchen')),
    (333, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (334, (SELECT id FROM roomtypes WHERE name = 'kitchen')),
    (334, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (335, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (336, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (337, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (338, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (339, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (340, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (341, (SELECT id FROM roomtypes WHERE name = 'teen-room')),
    (342, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (343, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (344, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (345, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (346, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (347, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (348, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (349, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (350, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (350, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (351, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (351, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (352, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (352, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (353, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (353, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (354, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (354, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (355, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (355, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (356, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (356, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (357, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (357, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (358, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (358, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (359, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (359, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (360, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (361, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (362, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (363, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (364, (SELECT id FROM roomtypes WHERE name = 'kids-room')),
    (365, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (366, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (367, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (367, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (368, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (368, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (369, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (370, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (371, (SELECT id FROM roomtypes WHERE name = 'kitchen')),
    (371, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (372, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (373, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (374, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (375, (SELECT id FROM roomtypes WHERE name = 'living-room')),
    (376, (SELECT id FROM roomtypes WHERE name = 'dining-room')),
    (377, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (378, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (379, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (379, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (380, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (380, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (381, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (381, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (382, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (382, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (383, (SELECT id FROM roomtypes WHERE name = 'bedroom')),
    (383, (SELECT id FROM roomtypes WHERE name = 'close-up')),
    (384, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (385, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (386, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (387, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (388, (SELECT id FROM roomtypes WHERE name = 'bathroom')),
    (389, (SELECT id FROM roomtypes WHERE name = 'ceiling')),
    (390, (SELECT id FROM roomtypes WHERE name = 'ceiling')),
    (391, (SELECT id FROM roomtypes WHERE name = 'ceiling')),
    (392, (SELECT id FROM roomtypes WHERE name = 'ceiling'))
) AS t(room_id, roomtype_id)
WHERE EXISTS (SELECT 1 FROM rooms WHERE rooms.id = t.room_id);
