I want to make monthly sales from the sales table but i store date data using time() format
Example :
UserID | Product | Date
1 | Hot Dog | 1504363230
4 | Chicken | 1504695631
1 | Potato | 1504761716
3 | Spinach | 1505003789
So, how can i create monthly sales from there without replace Date into date() ? Because it will take a long time if i have to change 300K row
What should i do ?
Select * FROM Sales WHERE UserID = UserID AND Date = ?
the output must be like this
UserID 1 do 2 transaction in the last month or UserID 1 do 3 transaction in this month