I have a table of items having same items with multiple prices by date and time. How can i calculate number of price increases of all the items. Below is a sample table
id, name , price, date_time
1, E1, 0.03193, 2021-02-23 10:58:47
2, E2, 0.03194, 2021-02-23 10:58:47
3, E3, 0.03195, 2021-02-23 10:58:47
4, E1, 0.03196, 2021-02-23 11:50:47
5, E2, 0.03198, 2021-02-23 11:50:47
6, E3, 0.03199, 2021-02-23 11:50:47
7, E1, 0.03191, 2021-02-23 08:48:47
8, E2, 0.03190, 2021-02-23 08:48:47
9, E3, 0.03192, 2021-02-23 08:48:47
10, E1, 0.03183, 2021-02-22 06:48:47
11, E2, 0.03190, 2021-02-22 06:48:47
12, E3, 0.03192, 2021-02-22 06:48:47
E1 will have 2
E2 will have 1
E3 will have 1
Each item will compare price with the price of its previous date/time entry