Ericsson Interview Question

SQL query