Nokia interview question

Write SQL Queries. Give output of the code.