Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Multiple Grand Totals - forum topic by spinage

$
0
0

Hello,
I have searched for days trying to find answer to this without any sucess.  
My Query:

select

        HOSTNAME

       ,LOCATION

       ,RACK_NUMBER

       ,RACK_POSITION

       ,RACK_UNITS

       ,POWER_WATTS

FROM TABLE

with sum(RACK_UNITS)(title 'Total Rack Units:')by location

with sum(VENDOR_MAX_WATT_POWER)(title 'Total WATT POWER:')by location

with sum(RACK_UNITS)(title 'Grand Total RUs:')

with sum(VENDOR_MAX_WATT_POWER)(title 'Grand Total WATT POWER:');

 

This will fail to run, but if I take out the last line it will run fine.  How in the heck do I get mutliple grand totals?

 

I would greatly appreciate any help with this.  I have spent hours and hours looking for a solution with no avail.

 

Thank very much,

Bill

 

 

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>