CREATE TABLE BLOCK (blockcode VARCHAR2, blockfloor VARCHAR2)
CREATE TABLE room (blockfloor VARCHAR2, blockcode VARCHAR2)

Find the number of rooms for different block code?
SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode
SELECT COUNT(*), "T1"."blockcode" FROM "BLOCK" "T1" JOIN "room" "T2" ON "T1"."blockcode" = "T2"."blockcode" AND "T1"."blockfloor" = "T2"."blockfloor" GROUP BY "T1"."blockcode"