When I will group by details column and look for the date "2009-08-05" I want the earlier one day id as well.
select id, details, abc_date from test order by details limit 10;
+------------+------------------+------------+
| id | details | abc_date |
+------------+------------------+------------+
| 2224 | 10025 | 2009-08-11 |
| 4575 | 10025 | 2009-09-02 |
| 1617 | 10025 | 2009-08-05 |
| 3614 | 10025 | 2009-08-24 |
| 1811 | 10025 | 2009-08-07 |
| 969 | 10025 | 2009-07-29 |
| 1441 | 10025 | 2009-08-03 |
| 4345 | 10025 | 2009-08-31 |
| 3330 | 10025 | 2009-08-21 |
| 799 | 10025 | 2009-07-27 |
+------------+------------------+------------+