开发者

How can I count the number of items that where inserted at given time intervall to the DB?

All Columns have a timestamp from that I can get that information. I tried already this but I don't g开发者_开发问答et it to work!!


if for example you want to group the number of occurences of a row by the hour part of the time stamp, try something like this (MySQL syntax):

select hour(TimeStamp) as interval, count(*) from data group by interval;


Did you try

... WHERE timestamp > 1305211123 AND timestamp < 1305215094

This is for unix timestamp of course, if you have datefield instead it's pretty similar though.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜