垃圾桶的空闲爆满情况/利用率分析

2024-02-21 18:38

本文主要是介绍垃圾桶的空闲爆满情况/利用率分析,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

满载:
select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m 
where m.WEIGHT BETWEEN 23.2265 and 27.29 order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc;空闲:
select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from 
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m 
where m.WEIGHT BETWEEN 0.2 and 13.745 order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc;select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT,
row_number() over(partition by m.GARDENNAME,m.THROWTIME order by m.WEIGHT desc) from 
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m 
order by m.DEVICECODE,m.SYS_KEY,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc;select m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT,
row_number() over(partition by m.GARDENNAME,m.THROWTIME order by m.WEIGHT desc) from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m 
order by m.GARDENNAME,m.GARBAGETYPE,m.SYS_KEY,m.THROWTIME,m.WEIGHT asc;按照垃圾分类求重量最大值、最小值、空闲、满载:
select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE;按照垃圾分类求重量满载:
select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.mz and n.zd order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc;按照垃圾分类求重量空闲:
select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.zx and n.kx order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc;求满载次数:
select q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME,count(*) as mz_cs from 
(select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.mz and n.zd order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc) q 
GROUP BY q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME order by q.DEVICECODE;
求空闲次数:
select q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME,count(*) as kx_cs from 
(select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.zx and n.kx order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc) q
GROUP BY q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME order by q.DEVICECODE求一个月内空闲次数:
select q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME,count(*) as kx_cs from 
(select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.zx and n.kx order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc) q
GROUP BY q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME having substr(q.THROWTIME,1,7) = substr(TO_CHAR(sysdate,'yyyy-mm-dd hh24:mi:ss'),1,7);求一周内空闲次数:
select q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME,count(*) as kx_cs from 
(select m.DEVICECODE,m.SYS_KEY,m.GARDENNAME,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT from  
(select DEVICECODE,SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) m,
(select p.GARBAGETYPE,max(p.WEIGHT) as zd,min(p.WEIGHT) as zx,((max(p.WEIGHT)+min(p.WEIGHT))*0.5) as kx,
(0.85*max(p.WEIGHT)+0.15*min(p.WEIGHT)) as mz from 
(select SYS_KEY,GARDENNAME,GARBAGETYPE,THROWTIME,to_number(WEIGHT) as WEIGHT from TFJL_COPY) p
GROUP BY p.GARBAGETYPE) n  
where m.GARBAGETYPE = n.GARBAGETYPE and m.WEIGHT BETWEEN n.zx and n.kx order by m.DEVICECODE,m.GARBAGETYPE,m.THROWTIME,m.WEIGHT asc) q
GROUP BY q.DEVICECODE,q.GARDENNAME,q.GARBAGETYPE,q.THROWTIME 
having trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))<=trunc(Sysdate) and trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))>= trunc(sysdate-7);求上一周的数据
Select * From TFJL_COPY a Where trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))>=trunc(Sysdate,'d')
AND trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))<= Next_day(trunc(sysdate,'d'),7);求当前日期前七天的数据
Select * From TFJL_COPY a Where trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))<=trunc(Sysdate) 
and trunc(TO_DATE(THROWTIME, 'yyyy-mm-dd hh24:mi:ss'))>= trunc(sysdate-7);删除多字段重复数据
DELETE FROM TFJL_COPY_COPY a
WHERE (a.DEVICECODE, a.THROWTIME,a.GARBAGETYPE,a.WEIGHT) IN 
(SELECT DEVICECODE,THROWTIME,GARBAGETYPE,WEIGHT FROM TFJL_COPY_COPY GROUP BY DEVICECODE,THROWTIME,GARBAGETYPE,WEIGHT HAVING COUNT(*) > 1)
AND ROWID NOT IN (SELECT MIN(ROWID) FROM TFJL_COPY_COPY GROUP BY DEVICECODE,THROWTIME,GARBAGETYPE,WEIGHT HAVING COUNT(*) > 1);查找多字段重复数据
SELECT * FROM TFJL_COPY_COPY a WHERE (a.DEVICECODE, a.THROWTIME,a.GARBAGETYPE,a.WEIGHT) IN (SELECT DEVICECODE,THROWTIME,GARBAGETYPE,WEIGHT
FROM TFJL_COPY_COPY GROUP BY DEVICECODE,THROWTIME,GARBAGETYPE,WEIGHT HAVING COUNT(*) > 1);

 

这篇关于垃圾桶的空闲爆满情况/利用率分析的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/732700

相关文章

性能分析之MySQL索引实战案例

文章目录 一、前言二、准备三、MySQL索引优化四、MySQL 索引知识回顾五、总结 一、前言 在上一讲性能工具之 JProfiler 简单登录案例分析实战中已经发现SQL没有建立索引问题,本文将一起从代码层去分析为什么没有建立索引? 开源ERP项目地址:https://gitee.com/jishenghua/JSH_ERP 二、准备 打开IDEA找到登录请求资源路径位置

SWAP作物生长模型安装教程、数据制备、敏感性分析、气候变化影响、R模型敏感性分析与贝叶斯优化、Fortran源代码分析、气候数据降尺度与变化影响分析

查看原文>>>全流程SWAP农业模型数据制备、敏感性分析及气候变化影响实践技术应用 SWAP模型是由荷兰瓦赫宁根大学开发的先进农作物模型,它综合考虑了土壤-水分-大气以及植被间的相互作用;是一种描述作物生长过程的一种机理性作物生长模型。它不但运用Richard方程,使其能够精确的模拟土壤中水分的运动,而且耦合了WOFOST作物模型使作物的生长描述更为科学。 本文让更多的科研人员和农业工作者

MOLE 2.5 分析分子通道和孔隙

软件介绍 生物大分子通道和孔隙在生物学中发挥着重要作用,例如在分子识别和酶底物特异性方面。 我们介绍了一种名为 MOLE 2.5 的高级软件工具,该工具旨在分析分子通道和孔隙。 与其他可用软件工具的基准测试表明,MOLE 2.5 相比更快、更强大、功能更丰富。作为一项新功能,MOLE 2.5 可以估算已识别通道的物理化学性质。 软件下载 https://pan.quark.cn/s/57

衡石分析平台使用手册-单机安装及启动

单机安装及启动​ 本文讲述如何在单机环境下进行 HENGSHI SENSE 安装的操作过程。 在安装前请确认网络环境,如果是隔离环境,无法连接互联网时,请先按照 离线环境安装依赖的指导进行依赖包的安装,然后按照本文的指导继续操作。如果网络环境可以连接互联网,请直接按照本文的指导进行安装。 准备工作​ 请参考安装环境文档准备安装环境。 配置用户与安装目录。 在操作前请检查您是否有 sud

线性因子模型 - 独立分量分析(ICA)篇

序言 线性因子模型是数据分析与机器学习中的一类重要模型,它们通过引入潜变量( latent variables \text{latent variables} latent variables)来更好地表征数据。其中,独立分量分析( ICA \text{ICA} ICA)作为线性因子模型的一种,以其独特的视角和广泛的应用领域而备受关注。 ICA \text{ICA} ICA旨在将观察到的复杂信号

【软考】希尔排序算法分析

目录 1. c代码2. 运行截图3. 运行解析 1. c代码 #include <stdio.h>#include <stdlib.h> void shellSort(int data[], int n){// 划分的数组,例如8个数则为[4, 2, 1]int *delta;int k;// i控制delta的轮次int i;// 临时变量,换值int temp;in

三相直流无刷电机(BLDC)控制算法实现:BLDC有感启动算法思路分析

一枚从事路径规划算法、运动控制算法、BLDC/FOC电机控制算法、工控、物联网工程师,爱吃土豆。如有需要技术交流或者需要方案帮助、需求:以下为联系方式—V 方案1:通过霍尔传感器IO中断触发换相 1.1 整体执行思路 霍尔传感器U、V、W三相通过IO+EXIT中断的方式进行霍尔传感器数据的读取。将IO口配置为上升沿+下降沿中断触发的方式。当霍尔传感器信号发生发生信号的变化就会触发中断在中断

kubelet组件的启动流程源码分析

概述 摘要: 本文将总结kubelet的作用以及原理,在有一定基础认识的前提下,通过阅读kubelet源码,对kubelet组件的启动流程进行分析。 正文 kubelet的作用 这里对kubelet的作用做一个简单总结。 节点管理 节点的注册 节点状态更新 容器管理(pod生命周期管理) 监听apiserver的容器事件 容器的创建、删除(CRI) 容器的网络的创建与删除

PostgreSQL核心功能特性与使用领域及场景分析

PostgreSQL有什么优点? 开源和免费 PostgreSQL是一个开源的数据库管理系统,可以免费使用和修改。这降低了企业的成本,并为开发者提供了一个活跃的社区和丰富的资源。 高度兼容 PostgreSQL支持多种操作系统(如Linux、Windows、macOS等)和编程语言(如C、C++、Java、Python、Ruby等),并提供了多种接口(如JDBC、ODBC、ADO.NET等

OpenCV结构分析与形状描述符(11)椭圆拟合函数fitEllipse()的使用

操作系统:ubuntu22.04 OpenCV版本:OpenCV4.9 IDE:Visual Studio Code 编程语言:C++11 算法描述 围绕一组2D点拟合一个椭圆。 该函数计算出一个椭圆,该椭圆在最小二乘意义上最好地拟合一组2D点。它返回一个内切椭圆的旋转矩形。使用了由[90]描述的第一个算法。开发者应该注意,由于数据点靠近包含的 Mat 元素的边界,返回的椭圆/旋转矩形数据