TD interview question

they ask about some SQL queries