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