Apexon interview question

SQL scenario based queries and unix