Tuesday, May 5, 2015

max date records

i have recods liek this

id      address1          date

1      xyz                 01/01/2013

1       abd                01/01/2014

2       dfg                 01/03/2015

now what  i want is just 1 record by id which has max date,if there is 2 records for same id,if there is 1 record then it should come

so here result should be

1       abd                01/01/2014

2       dfg                 01/03/2015

but i am getting duplicates records in my query

No comments:

Post a Comment