select * from (
select c,sum(a),count(b) from A T1 where type = 1 group by c
left outer join
select c,sum(a),count(b) from A T2 where type = 2 group by c
on T1.c = T2.c
)
大致是 表A左联接表A 只是业务类型type不一样 这样的join 是否 可行。求大神们给个思路或者其他的解决方案
select c,sum(a),count(b) from A T1 where type = 1 group by c
left outer join
select c,sum(a),count(b) from A T2 where type = 2 group by c
on T1.c = T2.c
)
大致是 表A左联接表A 只是业务类型type不一样 这样的join 是否 可行。求大神们给个思路或者其他的解决方案
1 个回复
laoyang360 - 《一本书讲透Elasticsearch》作者,Elastic认证工程师 [死磕Elasitcsearch]知识星球地址:http://t.cn/RmwM3N9;微信公众号:铭毅天下; 博客:https://elastic.blog.csdn.net
赞同来自: