Meta interview question

Two coding questions on SQL