Bradford would like to write a query that returns the average unit sales over the last 30 days for each of his bakery's product types: cupcakes, muffins, and cookies. There are several flavors of each in the table, but the product types are identified in a CATEGORY column as "Cupcake," "Muffin," or "Cookie." What should the last part of his query be, following the part shown below?
SELECT CATEGORY, AVG(UNIT_SALES) FROM PRODUCTS
A) ORDER BY CATEGORY;
B) GROUP BY CATEGORY;
C) BETWEEN ('Cupcake', 'Muffin', 'Cookie') ;
D) WHERE CATEGORY IN ('Cupcake', 'Muffin', 'Cookie') ;
Correct Answer:
Verified
Q17: Which clause lets you group data on
Q18: What SQL command do you use to
Q19: Mallory would like to display the rows
Q20: You form compound conditions by connecting two
Q21: When you need to find rows with
Q23: Adding a ORDER BY UNIT_PRICE clause to
Q24: What is the appropriate sequence for the
Q25: What does the following SQL query do?
Q26: Imagine you are working with a MySQL
Q27: Which operator finds rows that do not
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents