|
修改为:A/B列与E/F列两行内容相同的,整理后排列到一起;
select * from 基础全连接 limit 20;
create temp table aa as
select f01,row_number() over ( partition by f01) grp,f02,f03 from 基础全连接 a left join (select f05,f06 from 基础全连接) b on a.f01=b.f05 and a.f02=b.f06 where a.f01!='' and b.f05 is null;
create temp table bb as
select f05,row_number() over ( partition by f05) grp,f06,f07 from 基础全连接 a left join (select f01,f02 from 基础全连接) b on b.f01=a.f05 and b.f02=a.f06 where a.f05!='' and b.f01 is null;
select * from aa;
cli_add_html~bb;
select * from bb;
create temp table cc as
select f01,grp from aa union
select f05,grp from bb;
select * from cc;
create temp table dd as
select * from cc left join aa using(f01,grp) left join bb on cc.grp=bb.grp and f01=f05;
select colExclude[grp] from dd union all
select f01,f02,f03,highlight(b.f05),b.f06,b.f07 from 基础全连接 a join (select f05,f06,f07 from 基础全连接) b on a.f01=b.f05 and a.f02=b.f06 where a.f01!='' order by f01,f02;
|
|