|
select * from 基础分类汇总表转二维;
create temp table aa as
select 工程,费用类别,sum(金额) 金额 from 基础分类汇总表转二维 group by 工程,费用类别;
create temp table bb as
select 工程,'合计' 费用类别,sum(金额) from 基础分类汇总表转二维 group by 工程;
create temp table cc as
select '合计' 工程,费用类别,sum(金额) from 基础分类汇总表转二维 group by 费用类别;
create temp table dd as
select '合计' 工程,'合计' 费用类别,sum(金额) from 基础分类汇总表转二维;
create temp table ee as
select * from aa union all
select * from bb union all
select * from cc union all
select * from dd;
cli_create_two_dim_no_order~ee~费用类别~金额;
select * from ee_two_dim;
|
|