Citi Interview Question

SQL queries and sorting algorithms