Question Exhibit View the Exhibit and examine the data in the PROMOTIONS table Y
ID: 3911134 • Letter: Q
Question
Question Exhibit View the Exhibit and examine the data in the PROMOTIONS table You need to display all promo categories that do not have 'discount' in their subcategory Which two SQL statements give the required result? A) promo-category SELECT FROM promotions MINUS SELECT promo category FROM promotions WHERE promo-subcategory = 'discount'; B) promo-category SELECT FROM promotions INTERSECT SELECT promo_category FROM promotions WHERE promo_subcategory 'discount C) promo-category SELECT FROM promotions MINUS SELECT promo_category FROM promotions WHERE promo_subcategory 'discount' [] D) SELECT promo-category FROM promotions INTERSECT SELECT promo_category FROM promotions WHERE promo_subcategory - 'discount'Explanation / Answer
Answer: option A and B are correct
In the query A, it first difference between all the promo categories and those that have sub category = 'discount' using the MINUS operation. So the result is those records which do not have sub category discount
In the query B, the INTERSECT operation is used to find the common records between all records and those that do not have sub category of 'discount'. So the intersection is the set of records that do not have discount sub category.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.