SQL Editor

SQL Rollup Grouping Example

Task:

List suppliers and their products with total sales.
Include grand total, supplier subtotals, and supplier/product subtotals.
Click here for details on ROLLUP.
 
 107 Records
CompanyName ProductName Total Sales
NULL NULL 1354291.19
Aux joyeux ecclésiastiques NULL 163135.00
Aux joyeux ecclésiastiques Chartreuse verte 13150.80
Aux joyeux ecclésiastiques Côte de Blaye 149984.20
Bigfoot Breweries NULL 23776.80
Bigfoot Breweries Laughing Lumberjack Lager 2562.00
Bigfoot Breweries Sasquatch Ale 6678.00
Bigfoot Breweries Steeleye Stout 14536.80
Cooperativa de Quesos 'Las Cabras' NULL 26768.80
Cooperativa de Quesos 'Las Cabras' Queso Cabrales 13902.00
Cooperativa de Quesos 'Las Cabras' Queso Manchego La Pastora 12866.80
Escargots Nouveaux NULL 6664.75
Escargots Nouveaux Escargots de Bourgogne 6664.75
Exotic Liquids NULL 35916.80
Exotic Liquids Aniseed Syrup 3080.00
Exotic Liquids Chai 14277.60
Exotic Liquids Chang 18559.20
Forêts d'érables NULL 66266.70
Forêts d'érables Sirop d'érable 16438.80
Forêts d'érables Tarte au sucre 49827.90
Formaggi Fortini s.r.l. NULL 51082.50
Formaggi Fortini s.r.l. Gorgonzola Telino 16172.50
Formaggi Fortini s.r.l. Mascarpone Fabioli 9171.20
Formaggi Fortini s.r.l. Mozzarella di Giovanni 25738.80
Gai pâturage NULL 126582.00
Gai pâturage Camembert Pierrot 50286.00
Gai pâturage Raclette Courdavault 76296.00
G'day, Mate NULL 69636.60
G'day, Mate Filo Mix 3383.80
G'day, Mate Manjimup Dried Apples 44742.60
G'day, Mate Perth Pasties 21510.20
Grandma Kelly's Homestead NULL 43569.00
Grandma Kelly's Homestead Grandma's Boysenberry Spread 7345.00
Grandma Kelly's Homestead Northwoods Cranberry Sauce 13760.00
Grandma Kelly's Homestead Uncle Bob's Organic Dried Pears 22464.00
Heli Süßwaren GmbH & Co. KG NULL 40818.00
Heli Süßwaren GmbH & Co. KG Gumbär Gummibärchen 21534.90
Heli Süßwaren GmbH & Co. KG NuNuCa Nuß-Nougat-Creme 4051.60
Heli Süßwaren GmbH & Co. KG Schoggi Schokolade 15231.50
Karkki Oy NULL 29804.00
Karkki Oy Lakkalikööri 16794.00
Karkki Oy Maxilaku 9500.00
Karkki Oy Valkoinen suklaa 3510.00
Leka Trading NULL 44935.80
Leka Trading Gula Malacca 10524.20
Leka Trading Ipoh Coffee 25079.20
Leka Trading Singaporean Hokkien Fried Mee 9332.40
Lyngbysild NULL 10884.50
Lyngbysild Rogede sild 4740.50
Lyngbysild Spegesild 6144.00
Ma Maison NULL 24633.00
Ma Maison Pâté chinois 19512.00
Ma Maison Tourtière 5121.00
Mayumi's NULL 15510.90
Mayumi's Genen Shouyu 1813.50
Mayumi's Konbu 5234.40
Mayumi's Tofu 8463.00
New England Seafood Cannery NULL 28146.40
New England Seafood Cannery Boston Crab Meat 19048.30
New England Seafood Cannery Jack's New England Clam Chowder 9098.10
New Orleans Cajun Delights NULL 33351.95
New Orleans Cajun Delights Chef Anton's Cajun Seasoning 9424.80
New Orleans Cajun Delights Chef Anton's Gumbo Mix 5801.15
New Orleans Cajun Delights Louisiana Fiery Hot Pepper Sauce 14607.00
New Orleans Cajun Delights Louisiana Hot Spiced Okra 3519.00
Nord-Ost-Fisch Handelsgesellschaft mbH NULL 14775.54
Nord-Ost-Fisch Handelsgesellschaft mbH Nord-Ost Matjeshering 14775.54
Norske Meierier NULL 46897.20
Norske Meierier Flotemysost 20876.50
Norske Meierier Geitost 1713.50
Norske Meierier Gudbrandsdalsost 24307.20
Pasta Buttini s.r.l. NULL 52929.00
Pasta Buttini s.r.l. Gnocchi di nonna Alice 45121.20
Pasta Buttini s.r.l. Ravioli Angelo 7807.80
Pavlova, Ltd. NULL 115386.05
Pavlova, Ltd. Alice Mutton 35482.20
Pavlova, Ltd. Carnarvon Tigers 31987.50
Pavlova, Ltd. Outback Lager 11472.00
Pavlova, Ltd. Pavlova 18748.05
Pavlova, Ltd. Vegie-spread 17696.30
PB Knäckebröd AB NULL 12072.60
PB Knäckebröd AB Gustaf's Knäckebröd 7232.40
PB Knäckebröd AB Tunnbröd 4840.20
Plutzer Lebensmittelgroßmärkte AG NULL 155946.55
Plutzer Lebensmittelgroßmärkte AG Original Frankfurter grüne Soße 9685.00
Plutzer Lebensmittelgroßmärkte AG Rhönbräu Klosterbier 8650.55
Plutzer Lebensmittelgroßmärkte AG Rössle Sauerkraut 26865.60
Plutzer Lebensmittelgroßmärkte AG Thüringer Rostbratwurst 87736.40
Plutzer Lebensmittelgroßmärkte AG Wimmers gute Semmelknödel 23009.00
Refrescos Americanas LTDA NULL 4782.60
Refrescos Americanas LTDA Guaraná Fantástica 4782.60
Specialty Biscuits, Ltd. NULL 48793.80
Specialty Biscuits, Ltd. Scottish Longbreads 9362.50
Specialty Biscuits, Ltd. Sir Rodney's Marmalade 23635.80
Specialty Biscuits, Ltd. Sir Rodney's Scones 9636.00
Specialty Biscuits, Ltd. Teatime Chocolate Biscuits 6159.50
Svensk Sjöföda AB NULL 21789.80
Svensk Sjöföda AB Gravad lax 3047.20
Svensk Sjöföda AB Inlagd Sill 14542.60
Svensk Sjöföda AB Röd Kaviar 4200.00
Tokyo Traders NULL 33533.20
Tokyo Traders Ikura 22140.20
Tokyo Traders Longlife Tofu 2566.00
Tokyo Traders Mishi Kobe Niku 8827.00
Zaanse Snoepfabriek NULL 5901.35
Zaanse Snoepfabriek Chocolade 1542.75
Zaanse Snoepfabriek Zaanse koeken 4358.60
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.