开发者

How can I visualise a histogram of timestamps (stored in MySQL) without having to code much?

开发者 https://www.devze.com 2023-03-08 10:07 出处:网络
I have a big list of timestamps and I want to be able to plot them on graphs and display them in a similar way to google analytics, with the same easy ability to refresh the data and explore it intera

I have a big list of timestamps and I want to be able to plot them on graphs and display them in a similar way to google analytics, with the same easy ability to refresh the data and explore it interactively.

The timestam开发者_运维问答ps are stored in a MySQL database, bonus points for a solution that automatically queries it.


It's a bit tricky to answer without the slightest indication of what your data is or contains, but if you're counting clicks you're looking into a simple group by statement:

select date_format(click_date, '%Y-%m-%d') as click_date,
       count(*) as num_clicks
from clicks
where :start <= click_date and click_date < :end
group by date_format(click_date, '%Y-%m-%d')
0

精彩评论

暂无评论...
验证码 换一张
取 消