From d054e5449c9c4f0e5c4b25195e2923040ae38d61 Mon Sep 17 00:00:00 2001 From: yangkunan Date: Mon, 12 Aug 2024 17:19:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=BB=E8=A3=81=E5=AF=B9=E5=A4=96=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E5=9C=B0=E5=9B=BE=E6=8C=87=E6=A0=87=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- finereport/kanban/pc/总裁驾驶舱对外大屏数据集.sql | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/finereport/kanban/pc/总裁驾驶舱对外大屏数据集.sql b/finereport/kanban/pc/总裁驾驶舱对外大屏数据集.sql index db91875..849e476 100644 --- a/finereport/kanban/pc/总裁驾驶舱对外大屏数据集.sql +++ b/finereport/kanban/pc/总裁驾驶舱对外大屏数据集.sql @@ -695,7 +695,7 @@ CREATE TABLE IF NOT EXISTS dw.dws_president_map_d ( ; -TRUNCATE TABLE dw.dws_president_map_d +TRUNCATE TABLE dw.dws_president_map_d; DELETE FROM dw.dws_president_map_d WHERE CURRENT_DT = '2024-08-02'; INSERT INTO dw.dws_president_map_d @@ -705,17 +705,17 @@ current_date() AS CURRENT_DT -- 当前日期 ,a.City AS CITY -- 城市 ,a.County AS COUNTY -- 县 ,round(sum(a.ContractArea) / 10000,2) AS TREATY_AREA -- 合约面积(万m²) -,sum(a.ManageContractArea) / 10000 AS MANAGE_AREA -- 在管面积(万m²) +,round(sum(a.TakeOverArea) / 10000,2) AS MANAGE_AREA -- 在管面积(万m²) ,sum(c.room_num) AS ROOM_NUM -- 总户数(户) ,count(*) AS COMM_NUM -- 在管项目数 -FROM dim_project_base_info_d a +FROM dw.dim_project_base_info_d a inner join (select distinct organ_code, organ_name, comm_id , comm_name from dim_organ_mapping where comm_id is not null and comm_name not like '%撤场%' and comm_name not like '%案场%' and comm_name not like '%禁用%' and length(comm_id) != 0) b on a.CommId = b.comm_id left join ( select CommID, count(*) room_num - from dim_room_d + from dw.dim_room_d group by CommID ) c on a.CommId = c.CommID where 1=1