1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
;with cte as ( select * from c inner join r on r.rid = c.id where r.fid = 11111) select * from s inner join cte on cte.rid=s.rid select * from o inner join cte on cte.roomid=o.rid