Refer to the tables created in the New Build Script Chapter 11.sql http://www.me
ID: 3719619 • Letter: R
Question
Refer to the tables created in the New Build Script Chapter 11.sql
http://www.mediafire.com/file/dcxcnkn1yi6peg6/New%20Build%20Script%20Chapter%2011%283%29.sql
Determine the highest gross pay by the employees in the table employee_x.
SQL Statement Goes Here
Screen Shot Goes Here
Determine the lowest YTD sales from the table Store2
Screen Shot Goes Here
Screen Shot goes here
Determine the lowest starting bid for the item where the opening bid is in the month of January.
Screen Shot Goes Here
Screen Shot goes here
List the just the store name once and total weekly sales of the stores and the total weekly sales for the all the stores. Use the STORE table and the STORE-SALES table only.
Screen Shot Goes Here
Screen Shot goes here
Explanation / Answer
SELECT e.EMP_CODE,e.EMP_TITLE,e.EMP_LNAME,e.JOB_CODE,MAX(j.JOB_BASE_PAY) FROM
EMPLOYEE_X e INNER JOIN JOB j ON e.JOB_CODE=j.JOB_CODE;
SELECT STORE_CODE,STORE_NAME,MIN(STORE_YTD_SALES) FROM STORE2;
SELECT i.ino,i.title,b.timeOfBid,MIN(bidPrice) FROM item i INNER JOIN bid b ON i.ino=b.ino
WHERE timeOfBid between '01-Jan-08' AND '31-Jan-08'
GROUP BY i.ino
SELECT s.STORE_NAME,SUM(ss.store_Weekly_sales) FROM STORE s INNER JOIN store_sales ss ON s.Store_Code=ss.Store_Code
GROUP BY s.STORE_NAME
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.