Following successive inventory changes

A stationery shop performs two operations on the inventory table below. Each operation completes before the next begins, and no other changes occur.


Item ID

Category

Units

Status

201

Pen

8

Active

202

Pen

5

Clearance

203

Folder

12

Active

204

Pen

0

Active

205

Folder

4

Clearance


  1. UPDATE: Increase Units by 3 for every row whose Category is Pen AND whose Status is Active.
  2. DELETE: Remove every row whose Status is Clearance OR whose Units value is 0.

Find the number of rows changed by UPDATE, the number of rows removed by DELETE, and the total units remaining after both operations. Give all three answers as exact whole numbers, with no decimal places.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Relational Database Operations Questions: