zoukankan      html  css  js  c++  java
  • oracel查询最会一行添加合计 IT

    SELECT t."NAME",t."YEAR",t."MONTH",t."REMARK",t."ID_CARD",GWGZ,JSGZ,BLBT,TSJT,ZFBT,BFGZ,YFGZ,KYLBX,KZYNJ,KZFGJJ,KYILBX,
    KGRSDS,KKHJ,SFGZ,JWJT,SHBT,DQFJJTHJ,GGXBT,GWJTBT,HJ,KZFGJJhj,seygwgz,seyjsgz,heng from V_T_WAGE_STANDARD t  where 1 = 1
                       and NAME like '%--%'
                       and to_char(enter_time, 'yyyy-MM') >= '2020-12'
                       and to_char(enter_time, 'yyyy-MM') <= '2020-12'
    UNION all
    SELECT '合计','','','','',sum(GWGZ) GWGZ, sum(JSGZ) JSGZ,sum(BLBT) BLBT,sum(tsjt) TSJT,sum(ZFBT) ZFBT, sum(bfgz) BFGZ,sum(YFGZ) YFGZ,
           sum(KYLBX) KYLBX, sum(KZYNJ) KZYNJ,sum(KZFGJJ) KZFGJJ,sum(KYILBX) KYILBX, sum(KGRSDS) KGRSDS,sum(KKHJ) KKHJ, sum(SFGZ) SFGZ,
           sum(JWJT) JWJT,sum(SHBT) SHBT,sum(DQFJJTHJ) DQFJJTHJ,sum(GGXBT) GGXBT,sum(GWJTBT) GWJTBT,
           sum(HJ) HJ,sum(KZFGJJhj) KZFGJJhj,sum(seygwgz) seygwgz,sum(seyjsgz) seyjsgz,sum(heng) heng from V_T_WAGE_STANDARD
           where 1 = 1
                       and NAME like '%--%'
                       and to_char(enter_time, 'yyyy-MM') >= '2020-12'
                       and to_char(enter_time, 'yyyy-MM') <= '2020-12'

  • 相关阅读:
    nginx location 语法
    nginx 日志文件
    nginx 配置文件详解
    mysql分区partition
    MySQL跳过密码登录
    min/max优化,count ,group by
    in型子查询陷阱,exists子查询
    explain分析sql效果
    HDU2896 病毒侵袭 —— AC自动机
    二分图之 多重匹配 和 最大权匹配 等总结
  • 原文地址:https://www.cnblogs.com/qxqbk/p/14345573.html
Copyright © 2011-2022 走看看