SLK Group Interview Question

Based on the SQL queries