SELECT XH AS XH, --学号 DECODE(XSLYDM,'1','421',XSLYDM) AS XSLBDM, --学生类别代码 SUBSTR(SFQJDM, 1, 4) AS XN, --学年 SUM(YJJE) AS ZYS, --总应收 SUM(SJJE) AS ZYJ, --总已交 SUM(TFJE) AS ZTF, --总退费 SUM(JMJE) AS ZJM, --总减免 SUM(QFJE) AS ZQK, --总欠款 'CW_SFQKTJ' AS SJLY, --数据来源 '20230712' AS ACCT_DAY, --统计账期 SYSDATE AS CZSJ, --操作时间 '1' AS SFZSJ, --是否主数据 '1' AS SFGJSSSJ --是否关键事实数据 FROM STAGE.CW_SFQKTJ WHERE 1=1 GROUP BY XH
时间: 2023-10-11 09:05:43 浏览: 195
OCA 1Z0-051 Full Dummy
3星 · 编辑精心推荐
SELECT
XH AS XH, --学号
DECODE(XSLYDM,'1','421',XSLYDM) AS XSLBDM, --学生类别代码
SUBSTR(SFQJDM, 1, 4) AS XN, --学年
SUM(YJJE) AS ZYS, --总应收
SUM(SJJE) AS ZYJ, --总已交
SUM(TFJE) AS ZTF, --总退费
SUM(JMJE) AS ZJM, --总减免
SUM(QFJE) AS ZQK, --总欠款
'CW_SFQKTJ' AS SJLY, --数据来源
'20230712' AS ACCT_DAY, --统计账期
SYSDATE AS CZSJ, --操作时间
'1' AS SFZSJ, --是否主数据
'1' AS SFGJSSSJ --是否关键事实数据
FROM STAGE.CW_SFQKTJ
WHERE 1=1
GROUP BY XH
阅读全文