这样?
select a.id,a.name,a.ji.a.cloass,sum(b.Numeric) as sum_numeric
from stuinfo as a inner join  koufenbiao as b on a.id=b.id
where a.ji = '07' and a.class = '5' and b.date >='2008 - 6 - 20' and b.date<'2008 - 6 -21'
group by a.ji.a.class,a.id

解决方案 »

  1.   

    是的,不过你那语句有点小小的错误!
    呵呵
    select a.id,a.name,a.ji,a.class,sum(b.Numeric) as sum_numeric
    from stuinfo as a inner join  koufenbiao as b on a.id=b.id
    where a.ji = '07' and a.class = '5' and b.date >='2008 - 6 - 20' and b.date<='2008 - 6 -21'
    group by a.ji,a.class,a.id,a.name order by sum_numeric desc这是修改有的。
    谢谢你!