Question: Using Microsoft SQL Server Management Studio, answer the following questions.Each answer should show the SQL code! *All I need is the SQL Code to input*
Using Microsoft SQL Server Management Studio, answer the following questions.Each answer should show the SQL code!
*All I need is the SQL Code to input*
- Provide a count of the number of stores in each state.
- Show the top 30 customer zip codes in the country according to sales (not net sales).
- Select one state and, using 2015 data, show annual net sales (purchases minus refunds) for each store in that state. Show each store's number, city, state, and zip, and show results in descending order of annual net sales.


TRANSACT TRANSACTION_JD TRAN_DATE STORE REGISTER TRAN_NUM TRAN_TIME CUST_10 TRAIN LINE_NUM MIC TRAN TYPE ORIG_PRICE SALE PRICE TRAN AMT TENDER_TYPE 8 8 8 SKU 7 SKU DEPT SKU CLASS SKU_STORE SKU STYLE STORE UPC SKU COLOR RETAIL SKU_SIZE COST BRAND_NAME CUSTOMER STORE CLASSIFICATION 7 CUST_JD 9 STORE PACKSIZE CITY DIVISION STATE CITY ZIP CODE STATE ZIP_SECSEG ZIP_CODE DISTANCE_TO_NEAREST_STORE ZIP_SECSEG PREFERRED_STORE DEPARTMENT 7 DEPT DEPT_DESC DEPTDEC DEPTDEC_DESC DEPTCENT DEPTCENT_DESCQuick Launch (Ctri+Q) P - X SQLQuery3.sql - essql1.walton.uark.edu.WCOB_DILLARDS (GACL\\ESa508206 (62))* - Microsoft SQL Server Management Studio File Edit View Query Project Tools Window G . 0 1 - 1 - New Query . Of one Mi x X 1 2 - - 5 - NATHANIEL GOODALE * WCOB_DILLARDS Execute v 2 8 ::9 . 7 : Object Explorer 4 X SQLQuery3.sql - es...CL\\ESa508206 (62))* + X + Connect - * *# Y C + SELECT STATE FROM STORE DLF001 GROUP BY STATE GAF001 ORFO01 PROJECT B_DILLARDS atabase Diagrams ables System Tables FileTables 100 % External Tables Graph Tables Results Messages dbo.CUSTOMER STATE dbo.DEPARTMENT 1 AL dbo.SKU IN AR dbo.SKU_STORE 3 AZ dbo.STORE 4 CA Columns 5 CO wo STORE (PK, smallint, not null) FL DIVISION (char(2), not null) 7 GA CITY (varchar(28), not null) 8 IA STATE (char(2), not null) ID ZIP_CODE (char(5), null) 10 IL ZIP_SECSEG (char(4), null) 11 IN Keys 12 KS Constraints 13 KY Triggers 14 LA Indexes 15 MC Statistics Query executed successfully. essql1.walton.uark.edu (14... | GACL\\ESa508206 (62) | WCOB_DILLARDS | 00:00:00 | 30 rows Ready Ln 3 Col 15 Ch 15 INS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
