TF Holdings interview question

SQL Left join and group by