I need the query to select only the latest row for each client, based on the DateCreate column.
For example, the query results currently look like this:
| CustomerRef | Budget | Status | DateCreate |
|---|---|---|---|
| B725 | 0.00 | Ex-Customer | 2022-09-01 13:43:10 |
| B726 | 2400.00 | Ex-Customer | 2022-09-01 13:43:23 |
| B726 | 2400.00 | Suspended | 2022-09-01 13:42:20 |
| P324 | 0.00 | Suspended | 2022-09-28 11:12:22 |
| P324 | 0.00 | Ex-Customer | 2022-09-28 14:15:32 |
| W530 | 250.00 | Ex-Customer | 2022-09-27 09:04:11 |
So for customer B726, it should only show the row with the DateCreate of 2022-09-01 13:43:23. And for P324 it should only show the row with the DateCreate of 2022-09-28 14:15:32.