Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- listener 1883
- datagridview 직접입력
- c# datagridview 데이터 넣기
- mosquitto.conf
- pm2 상태 확인
- transfer
- setInterval 중지
- html #select #option #multiple
- setInterval 외부 정지
- pm2
- 1883
- DataGridView 직접 입력
- map이 undefined가 뜰 때
- setInterval clear
- allow_anonymouse
- pm2 시작
- mosquitto
- 서버동기화
- setInterval 정지
- AntDesign
- 맥 어드레스
- 데이터테이블 데이터 넣기
- DatePicker
- pm2 설치
- timepicker
- invalid data
- Replication
- mySQL_Replication
- pm2 확인
- 공인IP
Archives
- Today
- Total
개발 노트
그라파나 편차작업 본문
하는이유- scr과 비슷한그래프찾기 위해서, 완만성 나타내기
[보고있는 데이터]
FARM_3797_CHOI
panel title : Parksagol_234Dev_4010_이동_R20_T10_A144_편차
[비슷한것]
WITH tmpMovingAVG AS (
SELECT sum(avgRate) wall, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(wall+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(wall) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 71 PRECEDING AND CURRENT ROW)
AS AVG_1_3_편차_wallPlus100
FROM tmpMovingAVG
) K order by [time]
WITH tmpMovingAVG AS (
SELECT sum(walkAll) wall, sum(AVGRATE) avr, sum(avgVal) avVal, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW)
+ avg(avVal) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW)
- avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 167 PRECEDING AND CURRENT ROW)
AS avgVal추가
FROM tmpMovingAVG
) K order by [time]
WITH tmpMovingAVG AS (
SELECT sum(AVGRATE) wall, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(wall+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN $AVG_Time PRECEDING AND CURRENT ROW)
AS AVGRATE24_PLUS100
FROM tmpMovingAVG
) K order by [time]
419
WITH tmpMovingAVG AS (
SELECT sum(AVGRATE) wall, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd= $devCd
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(wall+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(wall) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 71 PRECEDING AND CURRENT ROW)
AS 삼일_평균편차
FROM tmpMovingAVG
) K order by [time]
WITH tmpMovingAVG AS (
SELECT sum(AVGRATE) avr, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd= 234
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(avr+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW)
AS Day_24시간평균
FROM tmpMovingAVG
) K order by [time]
WITH tmpMovingAVG AS (
SELECT sum(AVGRATE) avr, sum(WALKALL) walkall, sum(walk1+walk2+walk3+walk4+walk5+walk6+walk7+walk9+walk10+walk11+YL-avgVal+AVGRATE) walknum, sum(YL-avgVal+avgrate) ylVal, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd= 234
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(ylVal+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(ylVal) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 71 PRECEDING AND CURRENT ROW)
AS Day_24시간평균2
FROM tmpMovingAVG
) K order by [time]
418
WITH tmpMovingAVG AS (
SELECT sum(avgRate) avr, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 20 PRECEDING AND CURRENT ROW)
AS AVG_20_평균
FROM tmpMovingAVG
) K order by [time]
415
4월 14일 캡처
4월 12일
4월 8일
[실험] avgVal추가avgRATE-avgRate between167
WITH tmpMovingAVG AS (
SELECT sum(walkAll) wall, sum(AVGRATE) avr, sum(avgVal) avVal, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW)
+ avg(avVal) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW)
- avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 167 PRECEDING AND CURRENT ROW)
AS 실험
FROM tmpMovingAVG
) K order by [time]
[4일 편차]
WITH tmpMovingAVG AS (
SELECT sum(walkAll) wall, sum(AVGRATE) avr, sum(avgVal) avVal, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd='234'
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(avr+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(avr) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 95 PRECEDING AND CURRENT ROW)
AS 실험
FROM tmpMovingAVG
) K order by [time]
[5일편차]
[6일편차]
[7일편차]
4월 7일
4010번호, 222 기기번호
WALKALL
AVERAGE24+100
AVERAGE 하루-3일 편차 +100
WALKALL 2일-3일 편차 +100
4월 6일
WITH tmpMovingAVG AS (
SELECT sum(walkAll) wall, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd= $devCd
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(wall+100) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(wall) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 71 PRECEDING AND CURRENT ROW)
AS 삼일_평균편차
FROM tmpMovingAVG
) K order by [time]
4010번호
편차: 24시간 평균값- 3일평균값
WITH tmpMovingAVG AS (
SELECT sum(walkAll) wall, heatDt, heatTm, devCd from KITETERA.dbo.tblHeatNeo
where compCd='3797' AND devCd= $devCd
group by heatDt, heatTm, devCd
)
select * FROM (
SELECT CAST(heatDt+' '+heatTm+':00' as DATETIME) as [time],
avg(wall) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 23 PRECEDING AND CURRENT ROW) - avg(wall) OVER (ORDER BY heatDt, heatTm ROWS BETWEEN 47 PRECEDING AND CURRENT ROW)
AS avg23_avg47
FROM tmpMovingAVG
) K order by [time]
비교 208 - 3827
비교502
'발정데이터(공개)' 카테고리의 다른 글
3월 4주차 발정이 온소 : 4010,4030 (0) | 2022.03.29 |
---|---|
그라파나 FARM3797 비교하기 (0) | 2022.03.25 |
3월 3주차 발정이 온소 : 6703,6710,0915,4034,3900 (0) | 2022.03.24 |
2022.03.22_발정데이터_farm3797_09시&17시 (0) | 2022.03.22 |
2022.03.16_발정데이터_farm3797_09시&17시 (0) | 2022.03.16 |