Two columns are there one with veh_No and other one with date_time. How to get the maximum count of trips vehicle has done with respect to date
The input is given as :
Veh_No | Date_time |
---|---|
AP3029 | 2022-10-18 13:11:20 |
AP3029 | 2022-10-18 05:51:40 |
MP5029 | 2022-10-18 14:59:46 |
UP3040 | 2022-09-18 20:51:40 |
AP3029 | 2022-10-18 23:34:44 |
UP3040 | 2022-10-18 23:51:40 |
The output should be as :
Veh_No | Date_time | count |
---|---|---|
AP3029 | 2022-10-18 13:11:20 | 3 |
AP3029 | 2022-10-18 05:51:40 | 3 |
MP5029 | 2022-10-18 14:59:46 | 1 |
UP3040 | 2022-09-18 20:51:40 | 1 |
AP3029 | 2022-10-18 23:34:44 | 3 |
UP3040 | 2022-10-18 23:51:40 | 1 |