select Writer, decode(groupid,1,cntname,null), summ from (SELECT nvl((a.name),'Total:') AS Writer count(DISTINCT a.name) cntname, count(b.isbn) AS Summ, grouping (a.name) groupid
FROM author a, book b
WHERE a.id = b.author_id
GROUP BY ROLLUP(a.name))
Last edited by Bonker; 07-06-2005 at 01:01 AM.
Experience is a hard teacher because she gives the test first, the lesson afterwards.