![]() |
|
![]() |
![]() |
Archives of the TeradataForumMessage Posted: Thu, 13 Nov 2008 @ 10:29:57 GMT
Hi, You can use SUM window function.. But this will give calculated result in extra column. Group total.. SELECT col1 , col2 , Ncol3 , SUM(Ncol3) OVER (PARTITION BY col1 ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) FROM tbl1 ORDER BY 1,2; For Grand total you can use.. : FROM tbl1 WITH SUM(Ncol3) ORDER BY 1,2; WITH SUM(Ncol3) Best Regards, Kapil Dev Sapra
| ||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||