What is each room's block code?
select t1.blockcode from block as t1 join room as t2 on t1.blockfloor = t2.blockfloor and t1.blockcode = t2.blockcode
How many rooms does each block code have?
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