First page Back Continue Last page Image

The WITH ROLLUP Keyword

SELECT vendor_id, COUNT(*) AS invoice_count,

SUM(invoice_total) AS invoice_total

FROM invoices

GROUP BY vendor_id WITH ROLLUP

The WITH ROLLUP Keyword is an extension of the GROUP BY Clause

The ROLLUP is creating this line which is summing or Rolling up the totals