2025年7月2日
摘要: -- 格式化日期to_char(日期,格式) -- 当前日期 select to_char(sysdate,'yyyyMMdd') from dual; -- 当前日期加(减)7天 年月日时分秒 SELECT SYSDATE - INTERVAL '7' DAY FROM DUAL ; -- 当前日 阅读全文
posted @ 2025-07-02 17:27 oppen 阅读(9) 评论(0) 推荐(0)
  2022年3月16日
摘要: -- 按天统计SELECT date_format(send_time,'%Y-%m-%d') as date FROM 表 ORDER BY date;-- 按周统计SELECT date_format(send_time,'%Y-%u') as date FROM 表 ORDER BY date 阅读全文
posted @ 2022-03-16 13:39 oppen 阅读(55) 评论(0) 推荐(0)
  2022年3月14日
摘要: 日期函数:date_trunc -- 按小时统计SELECT count(*), DATE_TRUNC('hour', 日期::timestamp)as d FROM 表 GROUP BY d ORDER BY d;--按天统计SELECT count(*), DATE_TRUNC('day', 日 阅读全文
posted @ 2022-03-14 16:20 oppen 阅读(970) 评论(0) 推荐(0)
  2022年2月28日
摘要: 读取csv文件时需把文件编码改为GB2312;而读取txt文件时选择编码为UTF-8 阅读全文
posted @ 2022-02-28 10:37 oppen 阅读(155) 评论(0) 推荐(0)
  2021年8月2日
摘要: jdk11 SonarQube数据库配置(版本8.7.1) # PostgreSQL 9.3 or greater# By default the schema named "public" is used. It can be overridden with the parameter "curr 阅读全文
posted @ 2021-08-02 10:44 oppen 阅读(244) 评论(0) 推荐(0)