I’m keeping track of some items by inserting records describing these items every hour as a cron job.
I have a table with
steamid(int),
eventid(auto_increment),
itemid(int),
value(int),
time(unix format).
I’m using the hourly statistics to generate a graph to show a 24 hour overview.
Now I’m trying to generate a 7 day historical view.
How can I select the largest value to occur every day for the last 7 days?
Or, if this is easier, how could I perhaps select the first or last entry for each day in the last 7 days?
Thanks in advance.
This will get the minimum and maximum of
valuefor each day in the past 7 days.Edit: Updated solution to get the data of entire row: