rendered paste body+-----+------------+--------+--------+------------+
| id | account_id | amount | status | date |
+-----+------------+--------+--------+------------+
| 164 | 764 | 10.00 | 0 | 2007-12-30 |
| 165 | 764 | 10.00 | 0 | 2007-12-30 |
| 166 | 764 | 10.00 | 0 | 2007-12-30 |
| 167 | 764 | 10.00 | 0 | 2007-12-30 |
| 168 | 764 | 10.00 | 0 | 2007-12-30 |
| 169 | 764 | 10.00 | 0 | 2007-12-30 |
| 170 | 764 | 10.00 | 0 | 2007-12-30 |
| 171 | 764 | 10.00 | 0 | 2007-12-30 |
| 172 | 764 | 10.00 | 0 | 2007-12-30 |
| 173 | 764 | 10.00 | 0 | 2007-12-30 |
| 174 | 764 | 10.00 | 0 | 2007-12-30 |
| 175 | 764 | 10.00 | 1 | 2007-12-30 |
| 176 | 764 | 10.00 | 0 | 2007-12-30 |
| 177 | 764 | 10.00 | 0 | 2007-12-30 |
| 178 | 764 | 10.00 | 0 | 2007-12-30 |
| 179 | 764 | 10.00 | 0 | 2007-12-30 |
| 180 | 764 | 10.00 | 0 | 2007-12-30 |
| 181 | 764 | 10.00 | 0 | 2007-12-30 |
| 182 | 764 | 10.00 | 0 | 2007-12-30 |
+-----+------------+--------+--------+------------+
19 rows in set (0.00 sec)
Now out of a result set like this, I want the MINIMUM DATE, AFTER THE MAXIMUM date LAST with status of 1.
So in this case, the result set date row I would want returned would be ROW ID 176, anyone have any suggestions?