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

help me to group the records - response (6) by barani_sachin

$
0
0

Hi Dieter,
Thanks for the solution.
Sorry for my ignorance and If you dont mind could you please explain the solution provided by you or please point to the appropriate manual.
WITH cte(grpcol,pd) AS (
SELECT grpcol, PERIOD(from_dt,to_dt)
FROM date_range_test )
SELECT *
FROM TABLE ( TD_SYSFNLIB.TD_NORMALIZE_OVERLAP_MEET(NEW VARIANT_TYPE(cte.grpcol),
cte.pd)
RETURNS (grpcol INT, pd PERIOD(DATE), cnt INT) HASH BY grpcol LOCAL
ORDER BY grpcol, pd ) AS dt
ORDER BY 1,2;
Thanks.
 


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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