税金汇总表新增时间区间

This commit is contained in:
yangkunan 2024-10-17 18:02:42 +08:00
parent d79abbc3d7
commit 72ca9d1a14

View File

@ -20,9 +20,12 @@ WITH corp AS (
FROM
"dwr"."fact_fim_subject_balance" t1
JOIN corp t2 ON t1.corp_code = t2.corp_code
WHERE
t1.acnt_year = '${YEAR(sQueryDate)}'
AND t1.acnt_mon = '${FORMAT(sQueryDate,"MM")}'
WHERE 1 = 1
-- t1.acnt_year = '${YEAR(sQueryDate)}'
-- AND t1.acnt_mon = '${FORMAT(sQueryDate,"MM")}'
AND concat(acnt_year,'-',acnt_mon) <= '${sQueryDate}'
AND concat(acnt_year,'-',acnt_mon) >= '${sQueryStartDate}'
AND t1.subject_code LIKE '2221%'
GROUP BY
LEFT(subject_code,6)
@ -62,9 +65,11 @@ WITH corp AS (
FROM
"dwr"."fact_fim_subject_balance" t1
JOIN corp t2 ON t1.corp_code = t2.corp_code
WHERE
t1.acnt_year = '${YEAR(sQueryDate)}'
AND t1.acnt_mon = '${FORMAT(sQueryDate,"MM")}'
WHERE 1 = 1
-- t1.acnt_year = '${YEAR(sQueryDate)}'
-- AND t1.acnt_mon = '${FORMAT(sQueryDate,"MM")}'
AND concat(acnt_year,'-',acnt_mon) <= '${sQueryDate}'
AND concat(acnt_year,'-',acnt_mon) >= '${sQueryStartDate}'
AND t1.subject_code LIKE '2221%'
)
SELECT