I have two tables like :
User:
Id | Name | Age |
1 | Pankhuri | 24
2 | Neha | 23
3 | Mona | 25
And another Price log:
Id | type | user_id | price | created_at|
1 | credit | 1 | 100 | 2021-03-05 12:39:43.895345
2 | credit | 2 | 50 | 2021-03-05 12:39:43.895345
3 | debit | 1 | 100 | 2021-03-04 12:39:43.895345
4 | credit | 1 | 100 | 2021-03-05 12:39:43.895345
These are my two tables from where i need to get heighst credit price user with their total price count acoording to last week date..
i want a result like :
like if i want to get result for user id 1 then result should be like: pankhuri on date 04/03 price 100
and on date 5
pankhuri on date 05/03 price 200
want only heighst price user in retirn with their price total on date basisi.