Magenic interview question

A few whiteboard questions. SQL questions, fairly simple programming problems.