-
Notifications
You must be signed in to change notification settings - Fork 1
/
normal_state.sql
61 lines (55 loc) · 984 Bytes
/
normal_state.sql
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--高炉7
select dateStr,num from
(
select dateStr,count(*) as num
from
(
SELECT CONVERT(varchar(100), [时间], 23) as dateStr
FROM [GL7].[dbo].[ZCS7]
where (热风压力<0.34
or 冷风流量<20
or 顶温东北>350
or 富氧流量<5000
)
and 时间>'2014-01-25'
) A
group by dateStr
) B
where num>100
order by dateStr
--高炉6
select dateStr,num from
(
select dateStr,count(*) as num
from
(
SELECT CONVERT(varchar(100), [时间], 23) as dateStr
FROM [GL6].[dbo].[ZCS6]
where 热风压力<0.28
or 冷风流量<15
or 顶温东北>400
or 富氧流量<5000
) A
group by dateStr
) B
where num>100
order by dateStr
--高炉3
select dateStr,num from
(
select dateStr,count(*) as num
from
(
SELECT CONVERT(varchar(100), [时间], 23) as dateStr
FROM [GL3].[dbo].[ZCS3]
where 热风压力<0.28
or 冷风流量<15
or 顶温东北>400
or 富氧流量<4000
) A
group by dateStr
) B
where num>100
order by dateStr
select min(时间) as mint,max(时间) as maxt
from [GL6].[dbo].[ZCS6]