EXL Service Interview Question

Write a sql query