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
Get step-by-step solutions from verified subject matter experts
