Domanda di colloquio di Meta

Two SQL question about correlation using CTEs and group by functions