Tesla interview question

SQL logic questions based on scenarios