List the names and number of employees supervised

This preview shows page 2 - 4 out of 5 pages.

7.List the names and number of employees supervised (label this value HeadCount) for all the supervisors who supervise more than two employees:
8.Find the id, name and the number of units sold by each salesperson who has sold computer desks.
9.Find the salesperson who has sold the most computer desks. List the salesperson id and total quantity sold.QUERY:10.List in alphabetical order the names of all employees (managers) who are now managing people with skill ID BS12. List each such manager’s name only once, even if that manager manages several people with this skill.QUERY:SELECT M.EmployeeNameFROM Employee_t AS M, Employee_t AS E, EmployeeSkills_t AS ESWHERE SkillId = 'BS12'and ES.EmployeeId = E.EmployeeIdand E.EmployeeSupervisor = M.EmployeeIdORDER BY 1;11.Display the salesperson name, product finish, and total quantity sold (label as Tot_Sales) for each finish by each salesperson.QUERY:SELECT DISTINCT SalespersonName, ProductFinish, SUM(OrderedQuantity) AS Tot_SalesFROM Salesperson_t, Orderline_t, Order_tWHERE Salesperson_t.SalespersonId = Order_t.SalespersonIdAND Order_t.OrderId = Orderline_t.OrderId AND Orderline_t.ProductId = Product_t.ProductIdGROUP BY SalespersonName, ProductFinish;

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture