Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Print the product code, name, and discount percentage of each product that has the same discount percentage as another product. Do not print a product

Print the product code, name, and discount percentage of each product that has the same discount percentage as another product. Do not print a product more than once. Sort the query result in the increasing order of product code. HINT: need to use a self join.

For each category that has at least one product, print its id, name, and the id and name of each product in that category. Sort the result in the increasing order of category id. HINT: need to use an inner join.

For each product category, print its id, name, and the id and name of each product in that category. Include categories without any product in the query result. Sort the result in the increasing order of category id. HINT: need to use an outer join.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

More Books

Students also viewed these Databases questions