Practice GROUP BY by adding each category's non-NULL amounts before checking the query output.
highlighted = computed this step
Input table
First sort the rows in your head into book and pen buckets.
try category buckets
Group query
For each bucket, add the known amount values; leave the NULL amount out of the sum.
compute sums by hand
Grouped output
Compare your hand totals with the grouped output.
check SUM(amount)