1: 2: 3: 4: 5: 6:
UPDATE TableC SET RoomSize = t2.cnt FROM TableC t1 inner join (SELECT t1.RoomID , COUNT(*) cnt FROM TableA t1 inner join TableB t2 on t1.SessionID = t2.SessionID GROUP BY t1.RoomID) t2 on t1.RoomID = t2.RoomID