1) Find the employees who earn more than the average salary in their department.
Tables:
employees
emp_id name salary dept_id
1 Alice 60000 10
2 Bob 75000 10
3 Charlie 50000 20
4 David 80000 20
5 Eva 55000 10
Find the total sales amount for each customer who made at least one purchase. Include the
customer name and total sales.
📋 Tables:
customers
customer_id customer_name
1 Alice
2 Bob
3 Charlie
orders
order_id customer_id amount
101 1 150
102 2 200
103 1 100
104 3 250