mardi 16 août 2016

Select all results but Order by condition on single column

I've some records in a table like below:

ID  Name Group JoinDate    ActiveDate
1   A    12    11-01-2015  25-05-2015
2   A    19    12-06-2014  27-08-2015
3   B    16    03-09-2015  12-04-2016
4   B    35    05-05-2013  21-07-2015
5   B    39    06-09-2015  14-08-2016

From the data i need a result set like below: PS: Result set is based on the ActivityDate order by desc

Result:

ID  Name Group JoinDate    ActiveDate
2   A     19   12-06-2014  27-08-2015
1   A     12   11-01-2015  25-05-2015
5   B     39   06-09-2015  14-08-2016
3   B     16   03-09-2015  12-04-2016
4   B     35   05-05-2013  21-07-2015

Any Suggestions?

Aucun commentaire:

Enregistrer un commentaire