程序代码:
close databases all
set safety off
use tj in 0
for i=3 to fcount()
blank all fields (field(i))
endfor
index on xxdm to xx
use qx in 0
select qx
set relation to xxdm into tj
scan
jgrs=0
for i=3 to 5
if evaluate(field(i))>=60
jgrs=jgrs+1
endif
endfor
replace zxss with zxss+1,dks with iif(qx.zf=0,dks,dks+1),yxrs with iif(qx.zf>=245,yxrs+1,yxrs),;
总分 with 总分+qx.zf,dkjgrs with dkjgrs+jgrs in tj
endscan
set relation to
select tj
set order to
calculate sum(zxss),sum(dks),sum(yxrs),sum(总分),sum(dkjgrs) to x1,x2,x3,x4,x5
go bottom
replace zxss with x1,dks with x2,yxrs with x3,总分 with x4,dkjgrs with x5
replace all ggl with dks*100/zxss,yxl with yxrs*100/zxss,pjf with 总分/zxss,pjfl with pjf*100/300,;
dkjgl with dkjgrs*100/(zxss*3),zhb with ggl*0.2+yxl*0.2+pjfl*0.2+dkjgl*0.4
index on -zhb to px for between(xxdm,"3702","3717")
mc=1
bzhb=zhb
scan
if zhb!=bzhb
mc=mc+1
endif
replace pm with mc
bzhb=zhb
mc=pm
endscan
set order to
browse
说明:
1、为了便于统计,在TJ.DBF中增加了一个字段:总分。
2、为了便于操作,使“全县”排在最后,将其代码改为“3720”
统计结果如下
图片附件: 游客没有浏览图片的权限,请
登录 或
注册