摘要:
CREATE OR REPLACE procedure DWUSER.update_DW_Amount as begin execute immediate 'truncate table DW_AMOUNT'; insert into DW_AMOUNTselect login_date, login_amount, login_fail_amount, register_amount, login_fail_amount/login_amount as LOGIN_FAIL_RATE FROM (select login_date, count(user_id) login 阅读全文
摘要:
select tb7.MM,cpu7,cpu6,cpu5,cpu4,cpu3,cpu2,cpu1 from(select substr(mi,-5) mm,cpu7 from(select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu7 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYS 阅读全文
摘要:
select * from(select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu7 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 18), 'yyyy/mm/dd hh24:mi' )AND TO_CHAR ( trunc(SYSDATE - 17 阅读全文
摘要:
//昨天0点到今天0点select * from tablename where create_time>= trunc(SYSDATE-1) and create_time <trunc(SYSDATE )//昨天8点到今天8点select * from tablename where create_time> trunc(SYSDATE-1)+ 8/24 and create_time < trunc(SYSDATE) + 8/24 阅读全文
摘要:
create table temp_cup asselect to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') a,avg(PARAMETER_VALUE) val from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( SYSDATE - 10, 'yyyy/mm/dd hh24:mi' )AND TO_CHAR ( SYSDATE - 9, ' 阅读全文