Question: SQL queries: Write an SQL command that will find any customers who have not placed orders. Find the employees who supervise other employees. For these

SQL queries:

  1. Write an SQL command that will find any customers who have not placed orders.
  2. Find the employees who supervise other employees. For these supervisors list their names and state as well as the number of employees they supervise (label this value HeadCount). List only those supervisors who supervise more than two employees.
  3. List the name of each employee, his or her birth date, the name of his or her manager, and the managers birth date. Give appropriate aliases. Report only those employees who are older than their manager;
  4. For every order that has been received, display the order ID, the total dollar amount owed on that order (youll have to calculate this total from attributes in one or more tables; label this result TotalDue), and the amount received in payments on that order (assume that there is only one payment made on each order). A. To make this query a little simpler, you dont have to include those orders for which no payment has yet been received. List the results in decreasing order of the difference between total due and amount paid B. Now modify the above query to also include those orders for which no payment has yet been received. List again the results in decreasing order of the difference between total due and amount paid.SQL queries: Write an SQL command that will find any customers whohave not placed orders. Find the employees who supervise other employees. For

CUSTOMER_T 1 CUSTOMERID 1 CUSTOMERNAME 1 CUSTOMER ADDRESS 1 CUSTOMERCITY - CUSTOMERSTATE - CUSTOMERPOSTAL CODE CUSTOMERS CUSTOMERSHIP ADDRESS_T DOESBUSINESSIN_T EMPLOYEE_T 1 EMPLOYEEID 10 EMPLOYEENAME EMPLOYEEADDRESS - EMPLOYEECITY 1 EMPLOYEESTATE - EMPLOYEEZIP 1 EMPLOYEEBIRTHDATE 1 EMPLOYEEDATEHIRED - EMPLOYEESUPERVISOR EMPLOYEESKILLS_T ORDER_T 0 ORDERID - CUSTOMERID - ORDERDATE FULFILLMENTDATE 1 SALESPERSONID 1 SHIPADRSID ORDERLINE_T ORDERLINEID 0 ORDERID 1 PRODUCTID - ORDEREDQUANTITY CUSTOMER_T 1 CUSTOMERID 1 CUSTOMERNAME 1 CUSTOMER ADDRESS 1 CUSTOMERCITY - CUSTOMERSTATE - CUSTOMERPOSTAL CODE CUSTOMERS CUSTOMERSHIP ADDRESS_T DOESBUSINESSIN_T EMPLOYEE_T 1 EMPLOYEEID 10 EMPLOYEENAME EMPLOYEEADDRESS - EMPLOYEECITY 1 EMPLOYEESTATE - EMPLOYEEZIP 1 EMPLOYEEBIRTHDATE 1 EMPLOYEEDATEHIRED - EMPLOYEESUPERVISOR EMPLOYEESKILLS_T ORDER_T 0 ORDERID - CUSTOMERID - ORDERDATE FULFILLMENTDATE 1 SALESPERSONID 1 SHIPADRSID ORDERLINE_T ORDERLINEID 0 ORDERID 1 PRODUCTID - ORDEREDQUANTITY

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!