mardi 5 janvier 2016

selecting unique records monthly basis

I have one table, records like

id      date       branch
1001    01/01/2015  VBR
1002    02/05/2015  CBR
1001    03/01/2015  VBr
1005    05/05/2015  CBR
1005    12/12/2015  VBR
1006    05/05/2015  CBR

I need to select records monthly wise (date wise) but it should be unique, otherwise it should not be in any other month eg: if I select month 5/2015 it should return 1006

Aucun commentaire:

Enregistrer un commentaire