postgre查询一段时间内的数据

Posted xiaoliu66007

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了postgre查询一段时间内的数据相关的知识,希望对你有一定的参考价值。

 

select * from zaiko 
where createtime between (now() - interval 3 Days) and now() ;

select * from zaiko 
where createtime between (now() - interval 5 Mins) and now()

 ps经过实际核实,这方法有毛病,刚入的数据,几十秒之后才能刷的出来

以上是关于postgre查询一段时间内的数据的主要内容,如果未能解决你的问题,请参考以下文章

给定时间内的 Postgres SUM

具有大量查询的 node-postgres

相同数据空间内的 postgres 主要升级(9.5.x 到 9.6.x)

为啥我的 Postgres 数据库工作了一段时间,然后重新启动后无法“启动服务器”?

查询 Postgres 数据库 - Clojure

MySql 查询到 Postgres 查询。 Postgres 不支持 IF 条件