各位版友:
我使用
select product,count(case when tag='1' then '1' else null end) as a_row from a_table group by product;
select product,count(case when tag='1' then '1' else null end) as b_row from b_table group by product;
不知道有没有机会合并查寻,结果会变成
table_c
product a_row b_row