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...
-
Presented below is a list of items that could be included in the intangible assets section of the balance sheet. 1. Cost of purchasing a patent from an inventor. 2. Unrecovered costs of a successful...
-
In Exercises 3948, find the term indicated in each expansion. (x - 1) 10 ; fifth term
-
Maria Rossi just applied for a bank loan to finance an Italian restaurant she wants to launch. When visiting a banker about a loan application, a question posed to her was if she had results from any...
-
Express Delivery is a rapidly growing delivery service. Last year, 80% of its revenue came from the delivery of mailing pouches and small, standardized delivery boxes (which provides a 20%...
-
(a) The equity share of VCC Ltd. is quoted at Rs. 210. A 3-month call option is available at a premium of Rs. 6 per share and a 3-month put option is available at a premium of Rs. 5 per share....
-
create a Marketing 2033; In class Interview /Brand Presentation (15%) Goal : To bring together PMP development in one final verbal and visual presentation. Assignment : In a mock interview (I will be...
-
A few years ago a couple purchased an office space by financing RA for n years, paying periodic installment of Rp with an interest of r% compounded bimonthly (every 2 months). They have made t...
-
3. What is k after invoking nPrint("A message", k) in the following codes? int k = 3; nPrint("A message", k); a. b. C. d. e. 0 123N None of the above.
-
1. The solution of Schrodinger's equation for a particle in a potential well of infinite depth provides us the allowed wavefunctions and their corresponding energies. The following equation gives is...
-
Using the energy level chart below, if a photon with an energy of 2.856 eV is * 1 point emitted from this atom what energy transition occurred? 818 n=7 n=5 n=4 n=3 n=2 n=1 n=6 dopped to n=3 ne3...
-
- 8a. Two pucks with mass m = 0.05 kg and m = 0.08 kg are sitting on a frictionless table connected by a thin, light string of length 0.40 m. They are made to spin about a common point on the string...
-
2. Write a Java program that generates StringIndexOutOfBoundsException exception. b. Ensure that the exception is handled by using the appropriate exception type. 3. Explain the difference between...
-
UMITA (Malaysia)'s normal trading currency is MYR. Today, The company was informed by Big M (USA) that it had won a USD 10,000,000 bid to supply and install an electronic ticketing system. According...
-
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...
-
Calculate the corporate income tax for each of the following corporate taxable incomes. For each, determine the effective (average) tax rate and the marginal tax rate. a. $12,000 b. $65,000 c....
-
Calculate the corporate income tax for each of the following corporate taxable incomes. For each, determine the effective (average) tax rate and the marginal tax rate. a. $22,000 b. $93,000 c....
-
The average tax rate on a corporate income of \(\$ 87,000\) is closest to which of the following? a. 15 percent b. 20.5 percent c. 25 percent d. 34 percent
Study smarter with the SolutionInn App