优化荆楚水库雨量实时表
parent
e438b1c5e6
commit
e00ea1a642
|
|
@ -13,6 +13,9 @@
|
||||||
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '1 hour' and t1.tm) h1,
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '1 hour' and t1.tm) h1,
|
||||||
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '3 hour' and t1.tm) h3,
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '3 hour' and t1.tm) h3,
|
||||||
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '6 hour' and t1.tm) h6,
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '6 hour' and t1.tm) h6,
|
||||||
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '12 hour' and t1.tm) h12,
|
||||||
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '24 hour' and t1.tm) h24,
|
||||||
|
(select sum(t3.drp) from st_pptn_r t3 where t3.stcd=t1.stcd and t3.tm BETWEEN t1.tm - interval '48 hour' and t1.tm) h48,
|
||||||
CURRENT_TIMESTAMP chtm
|
CURRENT_TIMESTAMP chtm
|
||||||
from st_pptn_r t1 where exists(select 1 from m1 t2 where t2.stcd=t1.stcd and t2.tmx=t1.tm) and stcd = #{stcd}
|
from st_pptn_r t1 where exists(select 1 from m1 t2 where t2.stcd=t1.stcd and t2.tmx=t1.tm) and stcd = #{stcd}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue