简体   繁体   中英

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 get it to work!!

例如,如果您想按时间戳的小时部分对行的出现次数进行分组,请尝试执行以下操作(MySQL语法):

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM