This commit is contained in:
wangxu
2025-10-23 22:12:48 +08:00
40 changed files with 3528 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -138,4 +138,51 @@ GROUP BY a.perYear, a.brandCode ORDER BY a.perYear;
SQL6:
SELECT SUBSTR(sale_date, 1, 4),brand_code, SUM(goods_amt) FROM custom_offline_sale_return_local cosrl
WHERE SUBSTR(sale_date, 1, 10) >= '2024-05-01' AND SUBSTR(sale_date, 1, 10) <= '2025-06-30' AND brand_code IN ('SBZ', 'JXH')
GROUP BY SUBSTR(sale_date, 1, 4), brand_code;
GROUP BY SUBSTR(sale_date, 1, 4), brand_code;
SQL7:
SELECT
a."年份",
a."门店性质",
a."净销售金额",
b.settle_year AS "结算年份",
b.store_nature AS "门店性质(海澜提供)",
b.retail_amt AS "零售金额",
b.settle_amt AS "结算金额",
b.retail_amt - a."净销售金额" AS "差异"
FROM
(
SELECT
toYear(a.sale_time) AS "年份",
CASE
WHEN b.store_nature <> '' THEN b.store_nature
WHEN b.store_nature = '' THEN c.store_nature
END AS "门店性质",
SUM(a.goods_amt) AS "净销售金额"
FROM custom_offline_sale_return_local a
LEFT JOIN(
SELECT
store_code,
store_nature,
`year` AS period
FROM
custom_store_nature_all_local csnal
WHERE
source_table = 'store'
)b
ON a.store_code = b.store_code AND toString(toYear(a.sale_time)) = b.period
LEFT JOIN(
SELECT
store_code,
MIN(store_nature) AS store_nature
FROM
custom_store_nature_all_local csnal
GROUP BY store_code
)c
ON a.store_code = c.store_code
WHERE a.brand_code <>'SBZ'
AND a.brand_code <> 'JXH'
GROUP BY "年份","门店性质"
) a
LEFT JOIN dwd_storesettlement_hkaudit_settle_amt_mt b on toString(a."年份")=b.settle_year AND a."门店性质"=b.store_nature
ORDER BY a."年份",a."门店性质"

File diff suppressed because it is too large Load Diff