Flux Work interview question

General SQL query involves Coalesce, multi joins. And some Python coding which I am not familiar with.