A department store maintains data on customers, products, and purchase records in three tables: CUSTOMER, PRODUCT,...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A department store maintains data on customers, products, and purchase records in three tables: CUSTOMER, PRODUCT, and PURCHASE. The store manager wants to find the average price of all distinct products that are purchased within a category for each category. Write a query to print category and the average of price minus discount for the distinct products that are purchased in the category for each category. ▼ Schema Name: Type ID STATE CUSTOMER Description Integer A customer's ID in the inclusive range [1, 500]. This is a primary key. NAME String CITY String A city name. This field contains between 1 and 50 characters (inclusive). A state name. This field contains between 1 and 50 characters (inclusive). String A customer's name. This field contains between 1 and 100 characters (inclusive). Name ID Type Integer A product's ID in the inclusive range [1, 500]. This is a primary key. String A product's name. This field contains between 1 and 50 characters (inclusive). CATEGORY String A category name of the product. This field contains between 1 and 50 characters (inclusive). PRICE Integer The price of the product in the inclusive range [500, 1000]. DISCOUNT Integer The discount associated with the product in the inclusive range [5, 20]. AVAILABLE Integer The availability of a product. It is 1 if the product is available or it is O if the product is not available. NAME Name PRODUCT ID Description CUSTOMER_ID Type Integer An id associated with a purchase that is done in the inclusive range [1, 1000]. This is a primary key. Integer A customer ID. This is a foreign key to customer.customer_id. PRODUCT_ID Integer A product ID. This is a foreign key to product.product_id. PURCHASE_DATE Date The date associated with a purchase. The date falls in the range '2000-01-01' to '2000-12-31' (inclusive). PURCHASE Description A department store maintains data on customers, products, and purchase records in three tables: CUSTOMER, PRODUCT, and PURCHASE. The store manager wants to find the average price of all distinct products that are purchased within a category for each category. Write a query to print category and the average of price minus discount for the distinct products that are purchased in the category for each category. ▼ Schema Name: Type ID STATE CUSTOMER Description Integer A customer's ID in the inclusive range [1, 500]. This is a primary key. NAME String CITY String A city name. This field contains between 1 and 50 characters (inclusive). A state name. This field contains between 1 and 50 characters (inclusive). String A customer's name. This field contains between 1 and 100 characters (inclusive). Name ID Type Integer A product's ID in the inclusive range [1, 500]. This is a primary key. String A product's name. This field contains between 1 and 50 characters (inclusive). CATEGORY String A category name of the product. This field contains between 1 and 50 characters (inclusive). PRICE Integer The price of the product in the inclusive range [500, 1000]. DISCOUNT Integer The discount associated with the product in the inclusive range [5, 20]. AVAILABLE Integer The availability of a product. It is 1 if the product is available or it is O if the product is not available. NAME Name PRODUCT ID Description CUSTOMER_ID Type Integer An id associated with a purchase that is done in the inclusive range [1, 1000]. This is a primary key. Integer A customer ID. This is a foreign key to customer.customer_id. PRODUCT_ID Integer A product ID. This is a foreign key to product.product_id. PURCHASE_DATE Date The date associated with a purchase. The date falls in the range '2000-01-01' to '2000-12-31' (inclusive). PURCHASE Description
Expert Answer:
Related Book For
Managerial Decision Modeling with Spreadsheets
ISBN: 978-0136115830
3rd edition
Authors: Nagraj Balakrishnan, Barry Render, Jr. Ralph M. Stair
Posted Date:
Students also viewed these accounting questions
-
A store maintains data on customers, products and purchase records in three tables: CUSTOMER, PRODUCT, PURCHASE. The store manager wants to know which product is on its maximum discount for each...
-
A dentist wants to find the average time taken by one of her hygienists to take X-rays and clean teeth for patients. She recorded the time to serve 24 randomly selected patients by this hygienist....
-
In an e-sports company, the product manager wants to implement a new feature, that will give the player a reward after the player collected the home bonus for X consecutive times. The product thinks...
-
Assume you have just been hired as a business manager of PizzaPalace, a regional pizza restaurant chain. The companys EBIT was $120 million last year and is not expected to grow. PizzaPalace is in...
-
a. Set up an amortization schedule for a $25,000 loan to be repaid in equal installments at the end of each of the next 5 years. The interest rate is 10%. b. How large must each annual payment be if...
-
Let f (x) and g(x) be continuous functions on [0, 1], Prove: (a) (b) 1/2 71/2
-
In your view, what are the possible reasons behind a merger? And a demerger?
-
A certain outpatient medical procedure has five steps that must be performed in sequence. (a) Assuming that the time (in minutes) required for each step is an independent random variable, find the...
-
1.Copies of a purchase order are sent to all of the following except * A.inventory control B.general ledger C.accounts payable D.receiving 2.Accounting records that provide the audit trail for...
-
Plan a controlled experiment to investigate how much the temperature of cold sand and cold water change when hot water is added to them. Assume you have access to water, sand, containers, ice, a heat...
-
cCabe Corporation is expected to pay the following dividends over the next four years: $6.60, $17.60, $22.60, and $4.40. Afterward, he company pledges to maintain a constant 5.25 percent growth rate...
-
The gallbladder has a capacity of between 1.2 and 1.7 fluidounces. What is the capacity in milliliters of a gallbladder thatcan hold 1.42 fluid ounces? (There are 32 fl oz/qt.)
-
You have eight identical positive charges (all of charge +Q). You place one at the center of a circle and the other seven are spread out equally around a circle. One of the seven is at the very top...
-
After taking a look at Fisher-Price's website, choose two effective and two ineffective KPIs for this company that would be aligned with the sales and marketing goals. For all the KPIs, you are to...
-
Zeke Morris, a hobby farmer in Kamloops, and his partner, Betty Lou, have applied for a mortgage loan at the local bank. At the present time, there is a large supply of mortgage funds available. Rock...
-
Materials issued are as follows: Requisition No. 201 Material Job No. Amount Aluminum 500 89,050 202 Plastic 503 27,280 203 Rubber 504 3,580 204 Glue Indirect 2,460 205 Steel 510 38,470 Journalize...
-
Rodriguez Company pays $405,405 for real estate with land, land improvements, and a building. Land is appraised at $234,000; land improvements are appraised at $52,000; and the building is appraised...
-
A new car sold for $31,000. If the vehicle loses 15% of its value each year, how much will it be worth after 10 years?
-
Before market research was done, Peter Martin believed that there was a 50-50 chance that his food store would be a success. The research team determined that there was a 0.75 probability that the...
-
A certification program consists of a series of activities that must be accomplished in a certain order. The activities, their immediate predecessors, and estimated durations appear in the following...
-
Customers arrive at Valdezs Real Estate at an average rate of one per hour. Arrivals can be assumed to follow the Poisson distribution. Juan Valdez, the agent, estimates that he spends an average of...
-
Core Petroleum incurs the following costs relative to a gathering system: a. Purchase and installation costs of separators and compressors: $200,000 b. Operational costs for the system: $10,000 Give...
-
Assuming the same data as given in problem 8, was the well in each case profitable? Discuss your answer. Problem 8 Elizabeth Petroleum data in connection with Lease A are as follows: REQUIRED: Should...
-
A saltwater disposal system is added to Lease As gathering system at a cost of $150,000. The expense for the month of May 2016 is $15,000. Record the acquisition cost and the monthly expense assuming...
Study smarter with the SolutionInn App