timestamps 字段按天去group by的写法

来源:互联网 发布:淘宝图标 编辑:程序博客网 时间:2024/05/20 17:06

字段create_time 类型为timestamps,按天去查询数据可以使用如下方法:

group by  to_date(create_time::text, 'yyyy-mm-dd');group by  to_char(create_time, 'yyyy-mm-dd');group by crteat_time::date;
0 0
原创粉丝点击