Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
- Write an SQL command that will find any customers who have not placed orders.
- 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.
- 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;
- 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started