Question

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

NOTE: I have completed answers for your question along with explanation. Please check and let me know if you have any questions. I will revert back within 24 hours. Thanks for your patience.

1)
select
sum(oi.ExtendedPrice) as revenue
from
OrderItem oi
inner join
sku_data sd
inner join
retail_order ro
on
oi.sku = sd.sku
and
oi.OrderNumber = ro.OrderNumber
and
sd.Department = 'Camping';

Explanation:
1) We need to join all the tables to get the sum of revenue.
2) Then we need to match records for a particular department Camping.
3) For all the above records which department camping we have to get sum of extended price.

2)
select
sd.buyer
from
sku_data sd
inner join
OrderItem oi
inner join
retail_order ro
on
sd.sku = oi.sku
and
oi.OrderNumber = ro.OrderNumber
and
ro.storenumber = 10;

Explanation:
1) Here we need to join all the tables to get the required result.
2) We need to filter for store number 10 once all the tables are joined.
3) In the filtered result we need to identify the buyers.

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,Order Total ) SKU, SKU_Description, Department, Buyer) ID, OrderNumber, SKU, Quan...
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, OrderTotal) SKU, SKU_Description, Department, Buyer ID, OrderNumber, SKU, Quanti...

    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, Quantity, Price, ExtendedPrice) SKU Data OrderItem (1) Find Camping Department's Revenue. 10. (2) List buyers who bought some items sold in a store with StoreNumber 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, Quantity, Price, ExtendedPrice) SKU Data OrderItem (1)...

  • 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...

  • database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED...

    database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED BELOW CREATE TABLE Department ( DECIMAL(5) VARCHAR(30) CHAR(5) DATE NOT NULL NOT NULL NOT NULL * Department number /*Department name * Department manager number */ /Manager start date DNumber DName Manager MSDate CONSTRAINT Department_PK PRIMARY KEY(DNumber) CONSTRAINT Department_CK UNIQUE(DName) CREATE TABLE DeptLocation DECIMAL(5) VARCHAR(50) NOT NULL NOT NULL DNumber * Department number */ * Department location */ Address CONSTRAINT DeptLocation_PK PRIMARY KEY(DNumber, Address) CONSTRAINT...

  • SQL I have a database CREATE TABLE vendor ( vid CHAR(2) NOT NULL, vname VARCHAR(25) NOT...

    SQL I have a database CREATE TABLE vendor ( vid CHAR(2) NOT NULL, vname VARCHAR(25) NOT NULL, PRIMARY KEY (vid) ); CREATE TABLE category ( catid CHAR(2) NOT NULL, catname VARCHAR(25) NOT NULL, PRIMARY KEY (catid) ); CREATE TABLE product ( pid CHAR(3) NOT NULL, pname VARCHAR(25) NOT NULL, price NUMERIC (7,2) NOT NULL, vid CHAR(2) NOT NULL, categoryid CHAR(2) NOT NULL, PRIMARY KEY (pid)); CREATE TABLE region ( rid CHAR NOT NULL, rname VARCHAR(25) NOT NULL, PRIMARY KEY (rid)...

  • Questions: 1. What trends are happening as it relates to consumer retail purchases, online vs. in-store?...

    Questions: 1. What trends are happening as it relates to consumer retail purchases, online vs. in-store? 2. What challenges do traditional retailers face in trying to transition from in-store sales to online sales? 3. List and briefly describe at least three of the strategies that Target has implemented in its staffing system to better accommodate online sales. 4. What are the career implications of the trends described in this article? 5. From a consumer perspective, what are the relative advantages...

  • 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...

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