select count(*) 数目
from
(
select mobile,count(*)as count,sum(Sumfee)as total from Tab1
where calltime between '2003-11-1' and '2003-12-1'
group by mobile
having sum(Sumfee)>500
) a
from
(
select mobile,count(*)as count,sum(Sumfee)as total from Tab1
where calltime between '2003-11-1' and '2003-12-1'
group by mobile
having sum(Sumfee)>500
) a
不能运行啊!提示"没有为第 1 列(属于 'a')指定列。"
什么意思啊?
我头脑昏了:(
select count(*) 数目
from
(
select mobile,count(*) as count,sum(Sumfee) as total from Tab1
where calltime between '2003-11-1' and '2003-12-1'
group by mobile
having sum(Sumfee)>500
) a
from
(
select mobile,count(*)as count,sum(Sumfee)as total from Tab1
where calltime between '2003-11-1' and '2003-12-1'
group by mobile
having sum(Sumfee)>500
) a