Postgresql在日期上小于等于

时间:2015-02-06 15:10:49

标签: postgresql

对我来说,这看起来像一个postgresql(v9.4)错误,或者这是预期的行为? - created_at 2015-02-06的广告位于表格中,但未使用<=运算符

显示在第二个查询中
addb=# select max(created_at)::date from ads;
    max     
------------
 2015-02-06
(1 row)

addb=# SELECT created_at::date, 
       count(*) as num_ads, 
       'created'::text as "activity" 
       FROM ads where created_at>='2015-02-04'::date and 
       created_at<='2015-02-06'::date group by created_at::date;
 created_at | num_ads | activity 
------------+---------+----------
 2015-02-04 |    1153 | created
 2015-02-05 |    1230 | created
(2 rows)

0 个答案:

没有答案