zoukankan      html  css  js  c++  java
  • sql 记录

    select '总排量' as pollutantName,
           SUM(w.CORRECT_EMITOUT_VALUE),
           '0' AS totalEV
      from D_WATER_EMITION_HOUR_DATA w
     where w.sample_time between
           to_date('2011-05-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS') and
          sysdate
       and w.pollution_code = '34010000000232'
    --group by w.pollution_code

    union

    select s.name as pollutantName,
           sum(w.correct_emitout_value),
           '1' as totalEV
      from D_WATER_POLLUTANT_HOUR_DATA w, s_pollutant_code s
     where w.sample_time between
           to_date('2011-05-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS') and
           sysdate
         
       and w.pollution_code = '34010000000232'
       and s.code = w.pollutant_code
     group by w.POLLUTANT_CODE, s.name
     union
     select s.name as pollutantName,
           sum(g.correct_emitout_value),
           '2' as totalEV
      from d_gas_pollutant_hour_data g, s_pollutant_code s
     where g.sample_time between
           to_date('2011-05-24 00:00:00', 'YYYY-MM-DD HH24:MI:SS') and
          sysdate
       and g.pollution_code = '34010000000232'
       and s.code = g.pollutant_code
     group by g.POLLUTANT_CODE, s.name

     order by totalEV

  • 相关阅读:
    优达,计算机科学导论
    关于未来发展阶段小结
    CS50.5
    CS50.4
    简单查看tomcat中部署java服务的内存使用情况
    python3环境搭建(CentOS7.2)
    mysql主从配置脚本
    安装rkhunter
    转移到博客园啦!
    Eclipse上Maven环境配置使用 (全)
  • 原文地址:https://www.cnblogs.com/hl3292/p/2125844.html
Copyright © 2011-2022 走看看