|
Archives of the TeradataForumMessage Posted: Sat, 26 Nov 2011 @ 09:05:28 GMT
Hi, you can try below query for best count.... SEL (CNT_A + CNT_B + CNT_C) AS TOTAL_CNT FROM ( SELECT COUNT(*) AS CNT_A FROM (SELECT pi_col1,pi_col2,... from Table_a group by 1,2... ) )A CROSS JOIN ( SELECT COUNT(*) AS CNT_B FROM (SELECT pi_col1,pi_col2,... from Table_B group by 1,2... ) )B CROSS JOIN ( SELECT COUNT(*) AS CNT_C FROM (SELECT pi_col1,pi_col2,... from Table_C group by 1,2... ) )C Regards, Ram
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||