Aspect Ratio interview question

SQL questions on joins and CTEs