Valens DataLabs interview question

A SQL challenges with 2 tables