Question: In SQL - Using the Dillards Database below write a query that will show the following: 2) Select one state and, using 2015 data, show
In SQL -
Using the Dillards Database below write a query that will show the following:
2) Select one state and, using 2015 data, show annual net sales (purchases minus refunds) for each store in that state. Show each stores number, city, state, and zip, and show results in descending order of annual net sales
3) Select a different state and, using 2014 data, show total monthly net sales for that state. Show results in descending order.
4) Show, in descending order, the stores across the country that had the greatest total out-of-state sales for 2015 (Hint: where Customer State is not equal to Store State). Be sure to show the Store number, City, State, and Zip.
TRANSACT TRANSACTION_ID TRAN_DATE STORE REGISTER TRAN NUM TRAN_TIME CUSTID TRAN_UNE_NUM MIC TRAN_TYPE ORIG_PRICE SALE PRICE TRAN_AMT TENDER TYPE SKU SKU SKU DEPT SKU_CLASS SKU_STYLE UPC COLOR SKU SIZE BRAND NAME CLASSIFICATION PACKSIZE SKU_STORE 2 STORE SKU RETAIL COST STORE STORE DIVISION CITY STATE ZIP CODE ZIP_SECSEG CUSTOMER CUST_ID CITY STATE ZIP CODE ZIP SECSEG DISTANCE_TO_NEAREST_STORE PREFERRED STORE DEPARTMENT DEPT DEPT DESC DEPTDEC DEPTDEC_DESC DEPTCENT DEPTCENT DESCStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
