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

  • 相关阅读:
    机器学习第二次作业
    机器学习上机作业
    机器学习第一次作业
    软工实践个人总结
    第08组 Beta版本演示
    第08组 Beta冲刺(5/5)
    第08组 Beta冲刺(4/5)
    第08组 Beta冲刺(3/5)
    第08组 Beta冲刺(2/5)
    第08组 Beta冲刺(1/5)
  • 原文地址:https://www.cnblogs.com/hl3292/p/2125844.html
Copyright © 2011-2022 走看看