Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Counting unique values - response (1) by dnoeth

$
0
0
I  can't imagine why you need it, but this should be close: SELECT id, name, job, CASE WHEN ROW_NUMBER() OVER (PARTITION BY id,job,name ORDER BY id) = 1 THEN COUNT(*) OVER (PARTITION BY id,job,name) ELSE 0 END FROM tab Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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