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

qualify rank() over (partition) - question - forum topic by gksenthilkumar

$
0
0

Hello, i need some help please,
 
I have a dataset similar to the following:
inr rd dt    c1 c2
1 1 '2000-01-01 10:10:10 1111' 1 1
1 1 '2000-01-01 10:10:10 2222' 2 2
1 1 '2000-01-01 10:10:10 3333' 3 3
1 1 '2000-01-01 10:10:10 3333' 4 4
1 2 '2000-01-01 10:10:10 1111' 1 1
1 2 '2000-01-01 10:10:10 2222' 2 2
1 2 '2000-01-01 10:10:10 3333' 3 3
1 2 '2000-01-01 10:10:10 4444' 4 4
1 1 '2000-01-01 10:10:10 1111' 1 1
1 1 '2000-01-01 10:10:10 2222' 2 2
1 1 '2000-01-01 10:10:10 3333' 3 3
1 1 '2000-01-01 10:10:10 3333' 3 3
    
The result set should look like the following:
inr rd dt    c1 c2
1 1 '2000-01-01 10:10:10 3333' 4 4
1 2 '2000-01-01 10:10:10 4444' 4 4
1 1 '2000-01-01 10:10:10 3333' 3 3
Any suggestions would be appreciated.

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



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