Question

2. Join (30) Let a database have 3 tables: Retail Order OrderNumber, StoreNumber, StoreZip, OrderMonth, Orderyear, OrderTotal
0 0
Add a comment Improve this question Transcribed image text
Answer #1

[1]

SELECT Table1.Total AS Revenue
FROM (
SELECT T1.*
       FROM (
           SELECT OrderNumber , SUM(OrderTotal) as Total
           FROM Retail_ORDER
           GROUP BY OrderNumber
       ) AS T1
   ) AS Table1
         
JOIN
(
       SELECT T2.*
       FROM
       (
       SELECT OrderNumber, SKU
FROM OrderItem  
WHERE SKU IN (SELECT SKU FROM SKU_Data WHERE department like 'Campimg')          
       ) AS T2
   ) AS Table2
      
ON (Table1.OrderNumber = Table2.OrderNumber);  


[2]

SELECT C.Buyer
FROM Retail_ORDER AS A
JOIN       
OrderItem AS B
ON( A.OrderNumber = B.OrderNumber AND A.StoreNumber = 10)
JOIN
SKU_Data AS C
ON (B.SKU = C.SKU);     

Add a comment
Know the answer?
Add Answer to:
2. Join (30) Let a database have 3 tables: Retail Order OrderNumber, StoreNumber, StoreZip, OrderMonth, Orderyear, OrderTotal) SKU, SKU_Description, Department, Buyer ID, OrderNumber, SKU, Quanti...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. Join (30) Let a database have 3 tables: Retail Order OrderNumber, StoreNumber, StoreZip, OrderMonth, Orderyear,Order Total ) SKU, SKU_Description, Department, Buyer) ID, OrderNumber, SKU, Quan...

    2. Join (30) Let a database have 3 tables: Retail Order OrderNumber, StoreNumber, StoreZip, OrderMonth, Orderyear,Order Total ) SKU, SKU_Description, Department, Buyer) ID, OrderNumber, SKU, Quantity, Price, ExtendedPrice) SKU Data Orderltem (1) Find Camping Department's Revenue. (2) List buyers who bought some items sold in a store with StoreNumber- 10. 2. Join (30) Let a database have 3 tables: Retail Order OrderNumber, StoreNumber, StoreZip, OrderMonth, Orderyear,Order Total ) SKU, SKU_Description, Department, Buyer) ID, OrderNumber, SKU, Quantity, Price, ExtendedPrice) SKU Data...

  • You are given a database in a MS Access file called ‘DBP-e14-Cape-Codd’ that contains data collected...

    You are given a database in a MS Access file called ‘DBP-e14-Cape-Codd’ that contains data collected in an outdoor sports retail store. The retail store hired you as a data analyst to answer questions in order to help them make business decisions that will help them grow. Write the SQL statement for each query and save them in MS Access as Q1, Q2,… Please submit the MS Access and MS Word to help speed the grading turnout! in Blackboard. (to...

  • This is third time im posting this Question COURSE; introduction to database Please, No handwriti...

    This is third time im posting this Question COURSE; introduction to database Please, No handwriting thanks for your efforts Design the database by following . Execute the sample requested queries. . ER Diagram. . All schemas before and after normalization. . All SQL statements of: -Creating tables. - Inserting data in tables. -Queries. 5. Screenshots from MySQL (or any other software you use) Question is - Database system for a Wholesale Management System Consider a database system for a Wholesale...

  • This is third time im posting this Question COURSE; introduction to database Please, No handwriting thanks...

    This is third time im posting this Question COURSE; introduction to database Please, No handwriting thanks for your efforts Design the database by following . Execute the sample requested queries. . ER Diagram. . All schemas before and after normalization. . All SQL statements of: -Creating tables. - Inserting data in tables. -Queries. 5. Screenshots from MySQL (or any other software you use) Question is - Database system for a Wholesale Management System Consider a database system for a Wholesale...

  • Please help me to solve Please, No handwriting COURSE; introduction to database Q- write a query ...

    Please help me to solve Please, No handwriting COURSE; introduction to database Q- write a query SQL by Using the info below A. Normalize the Tables (in 3NF at least) B. Create the Normalized Tables and Populate them with at least 5 Rows C. Write the Wholesale Management System requested Queries & Execute them VERY IMPORTANT Screenshots from MySQL (or any other software you use) of all the tables after queries result. - Database system for a Wholesale Management System...

  • PLEASE MAKE SURE TO ANSWER PART 2 AND 3. YOU DON'T HAVE TO WORRY ABOUT PART...

    PLEASE MAKE SURE TO ANSWER PART 2 AND 3. YOU DON'T HAVE TO WORRY ABOUT PART 1, I ALREADY GOT IT PART 1 Part 1: Please read the business statement below and draw ER, NER, and Table Schema diagrams for it. You can submit your diagrams as a Dia file or an image file (GIF, JPG, or PNG). Business Statement: The project is about developing an auction Web site. The details are as follows: BA is an online auction Web...

  • 484 Core Concepts of Accounting Information Systems a. Using Access, create an employee table sim- ilar...

    484 Core Concepts of Accounting Information Systems a. Using Access, create an employee table sim- ilar to the one shown in Figure 15-4. Create created. (Hint You can use the aforemen- tioned expression for the department code as a validation rule.) at least one record for this table b. Create validation rules for the listed restric tions and an accompanying validation text for each. Document your work by provid- ing a table outlining exactly what rules you c. Test each...

  • Only need help with question 5 2 CASE The Human Resource Function of Harrison Brothers Corporation...

    Only need help with question 5 2 CASE The Human Resource Function of Harrison Brothers Corporation COMPANY HISTORY Harrison Brothers Corporation n was founded in upstate New York on September 15, 1898, by Aubrey and William Harrison. Harrison Brothers is a multi-line traditional department store tha t cares mainly men's, wome expanded to include household furnishings and other items for the home. The long-term goal of the company is to become the leading chain of department stores in the Northeast,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT