ServiceTitan interview question

Asked how to write a nested query