Lucid Motors interview question

Coding Questions in sequel that required two joins