Question: I need ONLY professional expert in Database course. I need all these questions to be answered correctly . Please use the SCHEMA to answer the
I need ONLY professional expert in Database course. I need all these questions to be answered correctly. Please use the SCHEMA to answer the following queries
Database I Course:
express the following queries in SQL:
Select all rows in the table DEPT_LOCATIONS. (0.25 point)
Select first name, middle initial, and last name of all employees supervised by the employee whose Social Security Number (SSN) is 333445555. (0.5 point)
Select the first name and salary of all female employees that work in department 5. (0.5 point)
Select project name and project number of all projects controlled by department 5. (0.5 point)
Select the department name and project name managed by the department. (0.75 point)
Use the LIKE operator and write a query to show the dependents whose name starts with the letter A (include all columns). (1 point)
Produce a relation showing the employee first name, name of his/her dependent, and relationship to the employee. (0.75 point)
Find the first and last name of all employees whose salary is above the average. (1 point)
Find the first and last name of all employees with no dependents. (1 point)
Produce a relation showing the department number and how many locations in each department ordered by the number of locations in descending order. Hint: you must use GROUP BY. (1.25 point)
For employees with dependents, produce a relation showing the first and last name of the employee, and the number of dependents he/she has ordered by the number of dependents in descending order. That is, your query should display this output: (1.25 point)
FNAME LNAME Number of Dependents
| Franklin | Wong | 3 |
| John | Smith | 3 |
| Jennifer | Wallace | 1 |
Modify the previous query to only show employees whose number of dependents is greater than 1. That is, your query should display the following output: (0.25 point)
FNAME LNAME Number of Dependents
| John | Smith | 3 |
| Franklin | Wong | 3 |
|
|
|
|
Write a query that uses an OUTER JOIN to produce the output in the following screen. The column DNAME refers to the department managed by the employee if he/she is a manager, otherwise, a hyphen is used to indicate that this employee is not a manager? You need to decide whether it will be a LEFT, RIGHT, or FULL OUTER JOIN. (1 point)

Figure 5.6 One possible database state for the COMPANY relational database schema. DEPARTMENT DEPT_LOCATIONS WORKS ON PROJECT DFPFNNFNT
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
