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
5
Clearance
203
Folder
12
204
0
205
4
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.
Unlock full course notes by signing up
Keys in an enrolment linking table
A college stores its records in three tables:
STUDENT(StudentID, Name, Program)
COURSE(CourseCode, Title, Credits)
Applying two membership filters
A recreation centre tests two alternative filters on its membership table. Apply each rule independently to every member, and enter keep or omit in each answer cell.
Rule P keeps a row when Age is at least 18 AND Fee paid is Yes.
Rule Q keeps a row when Age is at least 18 OR Fee paid is Yes. Here, OR includes rows that satisfy both conditions.
Predicting the result of an inner join
A distributor stores its sales representatives and their sales in two tables.
SALESREP
SALE
Planning a three-table query for a marketing list
A fitness chain records its data in three tables:
MEMBER(MemberID, Name, HomeClubID, JoinDate)
CLUB(ClubID, City)