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...
-
Record the following transactions in a general journal: May 4 Merchandise listed at $2,900, less a trade discount of 10%, is purchased on account, credit terms of 1/10, n/30, shipping terms FOB...
-
An importer of television sets from the Far East distributes them throughout the European Union from four warehouses. Shipments are received monthly, and this month's shipment is 120,000 sets. Due to...
-
\(45 \div 15 \times 6+7^{2}-4 \times 15 \times 18 \div 12 \times 3\) Perform the indicated calculation.
-
On January 1, 2014, the Hardin Company budget committee has reached agreement on the following data for the 6 months ending June 30, 2014. Sales units: First quarter 5,000; second quarter 6,000;...
-
A. Assume the firm's stock now sells for $20 per share. The company wants to sell some 20-year, $1,000 par value bonds with interest paid annually. Each bond will have attached 75 warrants, each...
-
A new company is planning to make and sell new cheap smart phones in America. They will sell the phone at $99.99 in a market that potentially buys 1 million smart phones every year. They hope to get...
-
CASE 9.1 MAQ Corporation MAQ Corporation, a major producer of consumer electronics equipment, is currently faced with a rapidly growing product line and its associated inventory problems. MAQ's...
-
Can materiality be set just for the overall financial statements, or must it also be allocated to individual account balances for planning purposes? Explain.
-
State the principle of superposition.
-
State the conditions of static equilibrium.
-
Can an audit be conducted efficiently without specifying materiality before starting specific audit procedures? Explain. What is the risk to the audit if materiality is not specified in advance of...
-
What is equivalent offset inertia force?
-
Recommended Decision-Making Procedure As you and your co-managers approach the task of making decisions for an upcoming year, we strongly recommend using the following procedure. The recommended...
-
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...
-
5. What can you do to protect your privacy online? Draw up a concrete list of steps that you might reasonably consider. Are there some actions that you would not be willing to take, either because...
-
4. Anthony Davis operated a computer bulletin board system that permitted users to send and receive e-mail, access the Internet, and download software. Davis's system had one attribute that...
-
1. The FTC offers advice to Web site operators about how to comply with the Children's Online Privacy Protection Act at http://www.ftc.gov/privacy/privacyinitiatives/childrens.html. Choose a Web site...
Study smarter with the SolutionInn App