Thoughtworks Interview Question

Few SQL queries and back end questions