First page Back Continue Last page Graphics
Example:
(Library): give the name and department of every borrower, together with the number of books not yet returned.
( select b.name, b.department, count(b.barcode)
from borrow as b
where b.tot IS NULL
group by b.name, b.department )
union
( select b.name, b.department, 0
from borrow as b
where not exists
( select *
from borrow as bb
where b.name=bb.name and b.department=bb.department and
bb.tot IS NULL ) )
Notes: