PM_LOG
/**查询所有网元的所有粒度**/
SELECT
EMS_PM_LOG_ID,
SUBNET_ID,
AMOID,
NE_TYPE,
PO_ID,
PO_TABLE,
GP_BEGIN_TIME,
LOG_TYPE,
MIN(LOG_TIME) MIN_END_TIME,
LOG_TIME,
MAX(LOG_TIME) MAX_END_TIME,
TIMESTAMPDIFF(MINUTE,GP_BEGIN_TIME,MAX(LOG_TIME))-15 DELAY_TIME,
COUNT(*) num
FROM
EMS_PM_LOG
GROUP BY
AMOID,
GP_BEGIN_TIME,
LOG_TYPE
ORDER BY
GP_BEGIN_TIME,AMOID DESC; /**查询一个网元的所有粒度**/
SELECT
AMOID,
GP_BEGIN_TIME,
LOG_TYPE,
MIN(LOG_TIME) min_end_time,
MAX(LOG_TIME) max_end_time,
COUNT(*) num
FROM
EMS_PM_LOG
WHERE
AMOID = 'iw5y99gk-3'
AND LOG_TYPE = 'download'
GROUP BY
AMOID,
GP_BEGIN_TIME; /**查询一个粒度的所有网元**/
SELECT
AMOID,
GP_BEGIN_TIME,
LOG_TYPE,
MIN(LOG_TIME) min_end_time,
MAX(LOG_TIME) max_end_time
FROM
EMS_PM_LOG
WHERE
LOG_TYPE = 'transform'
AND GP_BEGIN_TIME = '2017-02-13 09:15:00'
GROUP BY
AMOID; /*查询一个网元,一个粒度*****/
SELECT
AMOID,
GP_BEGIN_TIME,
LOG_TIME
FROM
EMS_PM_LOG
WHERE
AMOID = 'iw5y99gk-3'
AND LOG_TYPE = 'download'
AND GP_BEGIN_TIME = '2017-02-13 09:15:00'
ORDER BY
LOG_TIME DESC; SELECT
AMOID,
GP_BEGIN_TIME,
LOG_TIME
FROM
EMS_PM_LOG
WHERE
AMOID = 'iwbodzuq-2'
AND LOG_TYPE = 'transform'
AND GP_BEGIN_TIME = '2017-02-13 09:15:00'
ORDER BY
LOG_TIME DESC; SELECT
AMOID,
GP_BEGIN_TIME,
LOG_TIME
FROM
EMS_PM_LOG
WHERE
AMOID = 'iwbodzuq-2'
AND LOG_TYPE = 'transform'
AND GP_BEGIN_TIME = '2017-02-13 09:15:00'
ORDER BY
LOG_TIME DESC; ###-- 某个LOG_TYPE【download、transform、create zdc】相对于粒度结束时间的入库延迟,单位是秒
SELECT
EMS_PM_LOG_ID,
SUBNET_ID,
NE_TYPE,
PO_ID,
PO_TABLE,
LOG_TYPE,
AMOID,
GP_BEGIN_TIME,
LOG_TIME,
MAX(LOG_TIME) MAX_END_TIME,
TIMESTAMPDIFF(
MINUTE,
GP_BEGIN_TIME,
MAX(LOG_TIME)
) - 15 PM_STORAGE_DELAY_TIME
FROM
EMS_PM_LOG
WHERE
1 = 1
GROUP BY
AMOID,
GP_BEGIN_TIME,
LOG_TYPE
ORDER BY
PM_STORAGE_DELAY_TIME DESC;
PM_LOG的更多相关文章
随机推荐
- 分析器错误消息: 未能找到 CodeDom 提供程序类型
ylbtech-Error-WebForm:分析器错误消息: 未能找到 CodeDom 提供程序类型“Microsoft.CodeDom.Providers.DotNetCompilerPlatfor ...
- Android ActionBar使用介绍
一.什么是ActionBar 有图有真相,看一下图片就了解的差不多了 对于大多数应用,操作栏可以分割为 4 个不同的功能区域. 1. 应用图标 应用图标是您应用的标志.在应用图标位置摆放您自己的 lo ...
- textrank的方法,大概懂了
https://www.cnblogs.com/clover-siyecao/p/5726480.html 介绍了textrank. 不过我觉得对于长文本,textrank才有用些.短文本的话,估计没 ...
- Maximum Submatrix & Largest Rectangle
相关题型 问题一(最大和子矩阵) : 有一个 m x n 的矩阵,矩阵的元素可正可负.请找出该矩阵的一个子矩阵(方块),使得其所有元素之和在所有子矩阵中最大.(问题来源:http://acm.pku. ...
- RxJava【过滤】操作符 filter distinct throttle take skip first MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- vue路由跳转传参数
1. router-link <router-link :to="{ path: 'yourPath', params: { name: 'name', dataObj: data } ...
- Graph 卷积神经网络:概述、样例及最新进展
http://www.52ml.net/20031.html [新智元导读]Graph Convolutional Network(GCN)是直接作用于图的卷积神经网络,GCN 允许对结构化数据进行端 ...
- NumPy与ndarray简介(转)
http://blog.csdn.net/u014374284/article/details/45420645 一.NumPy简介 NumPy的全名为Numeric Python,是一个开源的Pyt ...
- What is dependency injection and when/why should or shouldn't it be used?
参考:https://stackoverflow.com/questions/130794/what-is-dependency-injection 原文:https://www.jamesshore ...
- Maven hive-jdbc教程
由于项目中需要用到hive-jdbc从数据仓库拉数据下来,所以简单的学一下hive,hive数据仓库建构在hadoop集群之上,数据存在hdfs文件系统中,hive中执行的操作会装换成mapreduc ...