select A.uid,count(*) from A GROUP by A.uid UNION all
select A.uid,count(*) from A,B where B.neid = A.neid GROUP by A.uid UNION all
select A.uid,count(*) from A,C where C.Type = 'student' and C.neid=A.neid GROUP by A.uid;
如果用每行语句单独查询,结果分别是这样的
select A.uid,count(*) from A GROUP by A.uid UNION all
select A.uid,count(*) from A,B where B.neid = A.neid GROUP by A.uid UNION all
select A.uid,count(*) from A,C where C.Type = 'student' and C.neid=A.neid GROUP by A.uid;
如果用每行语句单独查询,结果分别是这样的
5 回答3.3k 阅读✓ 已解决
3 回答3.7k 阅读✓ 已解决
2 回答2.8k 阅读✓ 已解决
5 回答1.4k 阅读
2 回答2.1k 阅读
3 回答2k 阅读
1 回答3.6k 阅读