Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Spr18Assign11(1)-Saved to my Mac a Search in Document Home Insert Design Layout

ID: 3740031 • Letter: S

Question

Spr18Assign11(1)-Saved to my Mac a Search in Document Home Insert Design Layout References Mailings Review View Share ^ Styles Pane Paste Emphasis Heading1 N ingures Using the NEW database provided( Employee.accdb" See Blackboard to download this DB), write SELECT statements to get the following information(most answers should use Sub-Queries): Sub Queries 1) Who(give their name) makes the most money in each 2.) List all the employees, fname, Iname and dept who 3.) Give the person, lname and fname, and their account building? make more money than the avg? number, who has the most money in their Retirement Account. 4.) Give a list of all employees(fname, Iname and dept) who make the least amount of money in their building, but only if they work in building 400, 402 or 405. 5.) Give a list of all the managers(fname, Iname and 6.) Give a list of all employees(fname, Iname and eid) 7) Give me the person(fname and lname) that makes the dept). [Hint: Self Join] who have their RetirementAccounts in Stocks. most SS and the person that makes the least. Use only one query(2 sub-queries)! 8.) Give the employee(fname and lname) that make the most money in each dept. Page 1 of 1 183 wordsEnglish (United States) ? ·E - Focus 144%

Explanation / Answer

--1

SELECT fname FROM Employees WHERE SALARY IN (SELECT MAX(SALARY) AS SALARY FROM Employees GROUP BY BUILD )

--2

SELECT fname,lname,Dept FROM Employees

WHERE Salary > (SELECT AVG(SALARY) FROM Employees )

--3

SELECT fname,lname,RetireAcctNum FROM Employees

WHERE RetireAmount=(SELECT MAX(RetireAmount) FROM Employees )

--4

SELECT fname,lname,Dept FROM Employees

WHERE Salary IN

(SELECT MIN(SALARY) FROM Employees

WHERE BUILD in (400,402,405)

GROUP BY BUILD)

--5

SELECT fname,lname,Dept FROM Employees

WHERE EID IN (SELECT Distinct MANAGE FROM Employees )

--6

SELECT fname,lname,EID FROM Employees

WHERE RetireACCT='Stocks';

--7

SELECT fname,lname,Dept FROM Employees

WHERE Salary =(SELECT MAX(SALARY) FROM Employees)

AND Salary =(SELECT MIN(SALARY) FROM Employees)

--8

SELECT fname,lname FROM Employees WHERE SALARY IN

(SELECT MAX(SALARY) AS SALARY FROM Employees GROUP BY DEPT )

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote