My SQL: ROLLUP
, MySQL, tutorial, course ROLLUP, extension of the GROUP BY clause produces another row and shows the grandtotal (superaggregate) value SELECT SUM(amount) AS dailysales, orderdate FROM transactions GROUP BY orderdate WITH ROLLUP; SELECT COUNT(transactionid) AS , of orders, orderdate FROM transactions GROUP BY orderdate WITH ROLLUP; SELECT COUNT(transactionid) AS , of orders, customerid FROM transactions GROUP BY customerid WITH ROLLUP; SELECT SUM(hourlypay) AS hourlypay, employeeid FROM employees GROUP BY employeeid WITH ROLLUP;
|
|