Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

write a select statement that returns these two columns: category_name and produ

ID: 3585199 • Letter: W

Question

write a select statement that returns these two columns: category_name and product_id. Return one row for each category that has never been used. Hint: use an outer join and only return rows where the product_id contains a null value write a select statement that returns these two columns: category_name and product_id. Return one row for each category that has never been used. Hint: use an outer join and only return rows where the product_id contains a null value write a select statement that returns these two columns: category_name and product_id. Return one row for each category that has never been used. Hint: use an outer join and only return rows where the product_id contains a null value

Explanation / Answer

1.
select product_id, category_name
FROM product LEFT OUTER JOIN category
ON product.category_id = category.category_id;

2.
SELECT category.category_name
FROM product RIGHT OUTER JOIN category
ON product.category_id = category.category_id
where product.product_id is null;