leading-project/dw/dim/dim_business_building_d.sql

16 lines
525 B
MySQL
Raw Normal View History

2024-07-21 22:06:45 +08:00
select
a.id
, a.project_id -- 项目id
, b.name project_name -- 项目名称
, a.building_code -- 楼栋代码
, a.name -- 名称
, case when a.type = 1 then '集中商业'
when a.type = 2 then '写字楼'
when a.type = 4 then '底商'
when a.type = 5 then '商业街'
end type -- 类型
, a.construction_area -- 建筑面积
from ods_bs_building_d a
left join ods_bs_project_d b
on a.project_id = b.id
where a.del_flag = 0