Advertisement
elektryk798

bazy 4

May 14th, 2018
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.43 KB | None | 0 0
  1. select last_name, department.name, sum(total)
  2. from employee inner join job on employee.job_id = job.job_id inner join customer on employee.employee_id = customer.salesperson_id inner join sales_order on customer.customer_id = sales_order.customer_id inner join department on employee.department_id = department.department_id
  3. where function='SALESPERSON' and total > 1280 and order_date >= '91/10/19'
  4. group by last_name, department.name;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement