Cari Blog Ini

26 April 2012

How to Use Syntax - With Cube

WITH CUBE – Menambahkan 1 row yang berisi total pada setiap aggregate function yang digunakan.

-----start-----
SELECT
 Item_Number
 ,sum(Extended_Price)[Extended Price]
 ,count(Extended_Price)[Count]
FROM Sample_With_Cube
GROUP BY Item_Number
WITH CUBE
-----end-----