X interview question

1 sql, 2 coding questions