Foxpro 双进线人数的统计
不知道是不是山东某学校特有的计算评价方式,计算总名次在X名之内,并且单科名次也在X名之内的各班级学生人数,一共九个学科:
语文、数学、外语、物理、化学、生物、政治、历史、地理
在数据表中分别用:
yy、ss、ee、ww、hh、bb、zz、ll、dd字段表示
0
clear all
accept "请输入要处理的表名:" to ys &&目标表
input '请输入指标名次:' to x1
use &ys
copy to linshi for aaxmc<=x1
for i=1 to 62
use linshi
count all for bj=i and yyxmc<=x1 to a1
count all for bj=i and ssxmc<=x1 to a2
count all for bj=i and eexmc<=x1 to a3
count all for bj=i and wwxmc<=x1 to a4
count all for bj=i and hhxmc<=x1 to a5
count all for bj=i and bbxmc<=x1 to a6
count all for bj=i and zzxmc<=x1 to a7
count all for bj=i and llxmc<=x1 to a8
count all for bj=i and ddxmc<=x1 to a9
use zhibiao
go i
repl yy with a1
repl ss with a2
repl ee with a3
repl ww with a4
repl hh with a5
repl bb with a6
repl zz with a7
repl ll with a8
repl dd with a9
endfor
*给定了2个条件,即年级前x1名中并且单科也在年级前x1名*
zhibiao数据表结构如图:
第一列为班级字段,内容批量添加;
其他列就是统计后替换的数据,代表每个班级双进线的人数
0