调整 可用库存为0不展示在表中

This commit is contained in:
2026-05-07 18:29:45 +08:00
parent af02c33af8
commit 7de3bf123c
5 changed files with 42 additions and 2 deletions
+2 -1
View File
@@ -83,6 +83,7 @@ shop_stock_latest AS (
) t
WHERE t.rn = 1
AND t."状态" <> '已失效'
AND t."可发库存" <> 0
GROUP BY
t."统一规格编码",
t."店铺主键"
@@ -158,7 +159,7 @@ LEFT JOIN analytics_layer.dim_shop ds
ON sl."店铺主键" = ds."店铺主键"
LEFT JOIN sales_summary ss
ON sl."统一规格编码" = ss."统一规格编码"
AND sl."店铺主键" = ss."店铺主键"
AND sl."店铺主键" = ss."店铺主键"
LEFT JOIN product_dim pd
ON sl."统一规格编码" = pd."统一规格编码"
WHERE pd."品牌名称" = {brand_filter}