Hi Everyone i am trying to get latest record between two range of date Suppose i have select date between '2022-08-01' and '2022-08-03', please help me out.
current table
| id | cust_name | amount | date |
|---|---|---|---|
| 1 | A | 100 | 2022-08-01 |
| 2 | A | 150 | 2022-08-02 |
| 3 | B | 100 | 2022-08-01 |
| 4 | B | 300 | 2022-08-02 |
| 5 | B | 50 | 2022-08-03 |
| 6 | B | 100 | 2022-08-04 |
| 7 | C | 200 | 2022-08-02 |
Expected output-:
| id | cust_name | amount | date |
|---|---|---|---|
| 2 | A | 150 | 2022-08-02 |
| 5 | B | 50 | 2022-08-03 |
| 7 | C | 200 | 2022-08-02 |