Demo entry 6785757

SQL语句

   

Submitted by anonymous on Mar 20, 2019 at 03:13
Language: SQL. Code size: 954 Bytes.

SELECT count(l.apply_no) COUNT
FROM appl_main_info l
WHERE to_char(l.date_created, 'yyyy-mm-dd hh24:mi') > to_char(sysdate-4/24, 'yyyy-mm-dd hh24:mi')
  AND l.date_created >= trunc(sysdate)
  AND l.loan_code = '0201'
GROUP BY to_char(TRUNC(l.date_created, 'HH24') + TRUNC(to_number(to_char(l.date_created, 'MI')) / 10) * 10 / 1440, 'hh24:mi')
ORDER BY to_char(TRUNC(l.date_created, 'HH24') + TRUNC(to_number(to_char(l.date_created, 'MI')) / 10) * 10 / 1440, 'hh24:mi');

SELECT count(l.apply_no) COUNT
FROM appl_main_info l
WHERE to_char(l.date_created, 'yyyy-mm-dd hh24:mi') > to_char(sysdate-4/24, 'yyyy-mm-dd hh24:mi')
  AND l.date_created >= trunc(sysdate)
  AND l.loan_code = '0201'
GROUP BY to_char(TRUNC(l.date_created, 'HH24') + TRUNC(to_number(to_char(l.date_created, 'MI')) / 10) * 10 / 1440, 'hh24:mi')
ORDER BY to_char(TRUNC(l.date_created, 'HH24') + TRUNC(to_number(to_char(l.date_created, 'MI')) / 10) * 10 / 1440, 'hh24:mi');

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).