Question
SQL Query to get information. Query the RETURNS table and list the product ids of the returned products a. Describe the returned products. Determine i.
SQL Query to get information.
Query the RETURNS table and list the product ids of the returned products
a. Describe the returned products. Determine
i. what products are returned
Need to know what products are returned and the SQL command to get this result.
ii. which products are returned most often
The products that had the most returns would be Staple envelope and KI Adjustable-Height Table.
SQL Command
select distinct REASON, count(*) from RETURNS
group by REASON
order by REASON;
Address (address_id, postal_code, state, region, country)
Category (category_id, category, sub_category)
Orderline (order_id), product_id)
Orders (row_id, order_id, order_date, ship_date, ship_mode, customer_id, address_id, product_id, product_name, quantity)
Product (product_id, product_name, category_id, sales, discount, customer_id)
Superstore (row_id, order_id, order_date, ship_date, ship_mode, customer_id, customer_name, segment, country, city, state, postal_code, region, product_id, category, sub_category, product_name, sales, quantity, discount, profit)
Returned (returned, order, reason)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started