Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a SELECT statement that uses the analytic functions to get the highest and lowest sales by product within each category. Return these columns: The

Write a SELECT statement that uses the analytic functions to get the highest and lowest sales by product within each category. Return these columns: The category_name column from the Categories table The product_name column from the Products table A column named total_sales that shows the sum of the sales for each product with sales in the Order_Items table A column named highest_sales that uses the FIRST_VALUE function to show the name of the product with the highest sales within each category A column named lowest_sales that uses the LAST_VALUE function to show the name of the product with the lowest sales within each category

Step by Step Solution

3.32 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

Here in this question to select sales FIRSTVALUE and LASTVALUE should be used because ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Programming questions

Question

6. Which types of memory are least impaired in people with amnesia?

Answered: 1 week ago