分开查询时可以的
select count(*) as '总委托数'
from a
where a.date1 >= '20100101' and a.date1 <= '20100831'
select count(date2) as '总成交数'
from b
where b.date2 >= '20100101' and b.date2 <= '20100831'
我想联合查询,就出现问题,如何解决
select count(*) as '总委托数',count(date2) as '总成交数'
from a,b
where a.date1 >= '20100101' and a.date1 <= '20100831'and
b.date2 >= '20100101' and b.date2 <= '20100831'