select avg(jl.jlxx) ,yh.yhh from yh , jl where yh.yhh = jl.yhh group by yh.yhh
我可能搞错题意了select avg(a.totaljlxx) /*所有用户的平均*/ from ( select count(jl.jlxx) totaljlxx ,yh.yhh /*每个用户的平均*/ from yh , jl where yh.yhh = jl.yhh group by yh.yhh )a
select avg(convert(float,a.totaljlxx)) /*所有用户的平均*/ from ( select count(jl.jlxx) totaljlxx ,yh.yhh /*每个用户的平均*/ from yh , jl where yh.yhh = jl.yhh group by yh.yhh )a
from yh , jl
where yh.yhh = jl.yhh
group by yh.yhh
from (
select count(jl.jlxx) totaljlxx ,yh.yhh /*每个用户的平均*/
from yh , jl
where yh.yhh = jl.yhh
group by yh.yhh )a
from (
select count(jl.jlxx) totaljlxx ,yh.yhh /*每个用户的平均*/
from yh , jl
where yh.yhh = jl.yhh
group by yh.yhh )a