SET SAFETY OFF
USE lsb
COPY STRUCTURE EXTENDED TO Tempk
USE Tempk IN 0
SELECT tempk
REPLACE ALL field_type WITH "N" ,field_len WITH 10,field_dec WITH 2
CREATE lsbk from tempk
APPEND FROM lsb
INDEX on 班级 TO tempindex
TOTAL TO hzk ON 班级
USE hzk IN 0
SELECT hzk
SCATTER TO arrm
SELECT lsb
APPENDblank
GATHER FROM arrm
REPLACE 班级 WITH "合计"