有关foxpro统计的结果的疑问CLOSE allSET TALK OFF CLEARUSE INDEX on TO yw.idxGO topa=0b=0c=0d=0DO WHILE EOF()DO CASE CASE 语文>=90a=a+1CASE 语文>=80 and and and
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 21:57:22
有关foxpro统计的结果的疑问CLOSE allSET TALK OFF CLEARUSE INDEX on TO yw.idxGO topa=0b=0c=0d=0DO WHILE EOF()DO CASE CASE 语文>=90a=a+1CASE 语文>=80 and and and
有关foxpro统计的结果的疑问
CLOSE all
SET TALK OFF
CLEAR
USE
INDEX on TO yw.idx
GO top
a=0
b=0
c=0
d=0
DO WHILE EOF()
DO CASE
CASE 语文>=90
a=a+1
CASE 语文>=80 and and and
有关foxpro统计的结果的疑问CLOSE allSET TALK OFF CLEARUSE INDEX on TO yw.idxGO topa=0b=0c=0d=0DO WHILE EOF()DO CASE CASE 语文>=90a=a+1CASE 语文>=80 and and and
统计各班、各科、各分数段人数的方法
*网友的帮助*
CREATE table temp (类别 c(13),区间90_100 n(2),区间80_89 n(2),区间70_79 n(2),区间60_69 n(2),区间50_59 n(2),区间40_49 n(2),不达39 n(2))
num="sum(iif(between(语
文,90,100),1,0)),sum(iif(between(语文,80,89),1,0)),sum(iif(between(语
文,70,79),1,0)),sum(iif(between(语文,60,69),1,0)),sum(iif(between(语
文,50,59),1,0)),sum(iif(between(语文,40,49),1,0)),sum(iif(between(语
文,0,39),1,0))"
qujian="(类别,区间90_100,区间80_89,区间70_79,区间60_69,区间50_59,区间40_49,不达39)"
INSERT INTO temp &qujian SELECT 班级+"班语文",&num FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","数学")
INSERT INTO temp &qujian SELECT 班级+"班数学",&tj FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","英语")
INSERT INTO temp &qujian SELECT 班级+"班英语",&tj FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","政治")
INSERT INTO temp &qujian SELECT 班级+"班政治",&tj FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","历史")
INSERT INTO temp &qujian SELECT 班级+"班历史",&tj FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","地理")
INSERT INTO temp &qujian SELECT 班级+"班地理",&tj FROM 七年级成绩 group by 班级
tj=strtran(num,"语文","生物")
INSERT INTO temp &qujian SELECT 班级+"班生物",&tj FROM 七年级成绩 group by 班级
LIST
注意:字段名不能超过10个字符
来源:扣群2123336/tlds_zgm