代码语言
.
CSharp
.
JS
Java
Asp.Net
C
MSSQL
PHP
Css
PLSQL
Python
Shell
EBS
ASP
Perl
ObjC
VB.Net
VBS
MYSQL
GO
Delphi
AS
DB2
Domino
Rails
ActionScript
Scala
代码分类
文件
系统
字符串
数据库
网络相关
图形/GUI
多媒体
算法
游戏
Jquery
Extjs
Android
HTML5
菜单
网页交互
WinForm
控件
企业应用
安全与加密
脚本/批处理
开放平台
其它
【
PLSQL
】
最近七天的数据每天相互对比
作者:
Dezai.CN
/ 发布于
2011/8/3
/
923
<div> 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(SYSDATE - 18), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 17), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 18),'yyyy/mm/dd')||'%') tb7 , (select substr(mi,-5) mm,cpu6 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu6 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 17), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 16), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 17),'yyyy/mm/dd')||'%') tb6 , (select substr(mi,-5) mm,cpu5 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu5 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 16), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 15), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 16),'yyyy/mm/dd')||'%') tb5 , (select substr(mi,-5) mm,cpu4 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu4 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 15), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 14), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 15),'yyyy/mm/dd')||'%') tb4 , (select substr(mi,-5) mm,cpu3 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu3 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 14), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 13), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 14),'yyyy/mm/dd')||'%') tb3 , (select substr(mi,-5) mm,cpu2 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu2 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 13), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 12), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 13),'yyyy/mm/dd')||'%') tb2 , (select substr(mi,-5) mm,cpu1 from (select to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') mi,avg(PARAMETER_VALUE) cpu1 from SANDBOXUSER.BMC_CPU where to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') BETWEEN TO_CHAR ( trunc(SYSDATE - 12), 'yyyy/mm/dd hh24:mi' ) AND TO_CHAR ( trunc(SYSDATE - 11), 'yyyy/mm/dd hh24:mi' ) group by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi') order by to_char(SAMPLE_TIMESTAMP_UTC,'yyyy/mm/dd hh24:mi')) where mi like TO_CHAR(trunc(SYSDATE - 12),'yyyy/mm/dd')||'%') tb1 where tb1.mm = tb2.mm and tb3.mm = tb2.mm and tb3.mm = tb4.mm and tb4.mm = tb5.mm and tb5.mm = tb6.mm and tb6.mm = tb7.mm </div>
试试其它关键字
数据每天相互对比
同语言下
.
查看某张表的表结构
.
oracle 集合操作
.
for 循环中倒序 用reverse
.
Oracle 临时表空间收缩
.
查看session及其对应运行的sql
.
Oracle常用查看表结构命令
.
Oracle Connect By Prior用法(实现递归查询)
.
重置排序 SEQUENCE
.
创建一个trigger
.
批量替换字段中的字符
可能有用的
.
C#实现的html内容截取
.
List 切割成几份 工具类
.
SQL查询 多列合并成一行用逗号隔开
.
一行一行读取txt的内容
.
C#动态修改文件夹名称(FSO实现,不移动文件)
.
c# 移动文件或文件夹
.
c#图片添加水印
.
Java PDF转换成图片并输出给前台展示
.
网站后台修改图片尺寸代码
.
处理大图片在缩略图时的展示
Dezai.CN
贡献的其它代码
(
4037
)
.
多线程Socket服务器模块
.
生成随机密码
.
清除浮动样式
.
弹出窗口居中
.
抓取url的函数
.
使用base HTTP验证
.
div模拟iframe嵌入效果
.
通过header转向的方法
.
Session操作类
.
执行sqlite输入插入操作后获得自动编号的ID
Copyright © 2004 - 2024 dezai.cn. All Rights Reserved
站长博客
粤ICP备13059550号-3