Table :
cmn_minor_code Course_start_date Batch_ID bthidd
PSSR 20 Feb 2014 B13227 PSSR/B1269
STSDSD 20 Feb 2014 B13263 STSDSD/B95
SSO 20 Feb 2014 B13716 SSO/B255
STSDSD_C 20 Feb 2014 B13939 STSDSD C/B58
DECGS 20 Feb 2014 B14218 DECGS/B17
STSDSD 20 Feb 2014 B14340 STSDSD/B96
SSO 20 Feb 2014 B14473 SSO/B256
Above Table Data Date wise Count data i want below Result
cmn_minor_code count Course_start_date Batch_ID bthidd
PSSR 1 20 Feb 2014 B13227 PSSR/B1269
STSDSD 2 20 Feb 2014 B13263 STSDSD/B95
SSO 2 20 Feb 2014 B13716 SSO/B255
STSDSD_C 1 20 Feb 2014 B13939 STSDSD C/B58
DECGS 1 20 Feb 2014 B14218 DECGS/B17
After Above Result wise Table SSO two times occur Bthidd values SSO/B255 and SSO/B256 this bthidd which one greater than value get
I want result SSO/B256
Thanks