cust_id | date
1_1 | 26 Jan 1992
1_01 | 27 Feb 1990
2_02 | 05 Apr 2004
2_2 | 03 Apr 2004
3_03 | 05 Aug 2010
My Data should look like
cust_id | date
1_1 | 26 Jan 1992
2_02 | 05 Apr 2004
3_03 | 05 Aug 2010
Some data is duplicated in the table. I need to delete the only the rows with minimum date for each cust_id.
The problem here is, for some cust_id the '0' is prefixed after underscore (eg: 1_1 and 1_01)
Could someone write a simple sql query to delete the duplicated cust_id with minimum date.