Multiple choice

Update inventory set price = price*.75 where not exists (select * from invoice_details i where inventory.item_no = i.item_number and inv_no in (select inv_no from invoices where inv_date> = getdate()-30)); The purpose of the above given query is Tables: Invoice_details(item,number,price,invoice_dat,inv_no) Inventory(item_no,price,inv_date,....) Invoices(inv_no,inv_date,....)

  1. to discount only those things that have sales since the inv_date

  2. to discount only those items that have had no sales within the last 30 months

  3. to gives 25% discount to only those items that have had sales within the past 30 days

  4. to discount only those items that have had no sales within the past 30 days

  5. None of these

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Option 4 is the correct answer, as it gives discount to only those items that have had no sales within the past 30 days.