SQL - Subqueries
You want to list all employees who have made sales, along with their total sales amount. Which approach is likely more efficient?
Option 1: Use a JOIN between
Option 2: Use a subquery to calculate total sales per employee and join that result to employees.
Option 1: Use a JOIN between
employees and sales and GROUP BY employee.Option 2: Use a subquery to calculate total sales per employee and join that result to employees.
