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

concatenate value of multiple rows into one Single row - response (3) by mensssanvi

$
0
0

 
I am trying to create a group of ranking as shown in below table. I've used the row () over partition function it is just doing a row numbering. In fact, I want the min row number in column "clust_n" to be allocated when rows in column wh_no match. (e.g. when 7923 come 3 times I would like clust_n to show 4,4,4 not 4,5,6
 
 

wh_no

cust_no

clust_n

 

7769

2701288

1

 

7771

224853

2

 

7809

701631

3

 

7923

3185005

4

4

7923

3185042

5

4

7923

968162

6

4

7999

2623738

7

 

12186

3263053

8

 

12905

5491540

9

 

13017

1079323

10

 

13017

1078590

11

10


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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