Valens DataLabs Interview Question

A SQL challenges with 2 tables