Task 3: Advanced SQL