vfp 6 select dj, sum(shuliang) as shl2 from wp grou by spbh,spmc into curs a1 select sum(dj*shl2) from a1 where shl2>0