颗粒化查询统计sql

SELECT
 TO_CHAR (to_date(substr(PAY_TIME,12,2), ‘hh24‘),‘hh24‘) || ‘:‘ || LPAD (
  FLOOR (TO_CHAR(TO_DATE(SUBSTR(PAY_TIME,15,2),‘mi‘), ‘mi‘) / 5) * 5,
  2,
  0
 ) cjsj,
 COUNT (*) num
FROM
 PAY_ORDER_INFO
GROUP BY
 TO_CHAR (to_date(substr(PAY_TIME,12,2), ‘hh24‘),‘hh24‘) || ‘:‘ || LPAD (
  FLOOR (TO_CHAR(TO_DATE(SUBSTR(PAY_TIME,15,2),‘mi‘), ‘mi‘) / 5) * 5,
  2,
  0
 )
ORDER BY
 TO_CHAR (to_date(substr(PAY_TIME,12,2), ‘hh24‘),‘hh24‘) || ‘:‘ || LPAD (
  FLOOR (TO_CHAR(TO_DATE(SUBSTR(PAY_TIME,15,2),‘mi‘), ‘mi‘) / 5) * 5,
  2,
  0
 );

  

颗粒化查询统计sql

上一篇:python中操作MongoDB


下一篇:DVWA sql注入low级别