Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Sort and Pick up latest date in BODS

$
0
0

Hi All,

 

My Input Table is as below.

 

Emp ID          Dept ID          Salary      Date

 

1                         1                    100     01/16/2015  

2                         1                    250     01/10/2015

1                         1                    400     01/25/2015

2                         1                    500     01/01/2015

 

 

I need to sort the data based on Emp ID, Dept ID so expected o/p should be

 

Emp ID          Dept ID          Salary          Date

1                         1                    100          01/16/2015

1                          1                    400          01/10/2015

2                         1                    250          01/10/2015

2                         1                        500     01/01/2015

 

    From the above table, For Each Emp ID, Dept ID, pick up the record with latest date. That means final o/p should be

 

Emp ID          Dept ID          Salary          Date

1                         1                    100          1/16/2015

2                         1                    250           1/10/2015

 

Could you please explain me how to achieve this.

 

Regards.


Viewing all articles
Browse latest Browse all 3719

Trending Articles



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