&&菜單-考試-統(tǒng)計代碼
SELECT year(簽訂日期) as 年份, month(簽訂日期) as 月份,;
sum(金額) as 合計;
FROM employee INNER JOIN orders ;
ON Employee.職員號 = Orders.職員號;
GROUP BY 1, 2;
ORDER BY 1 DESC, 2;
INTO TABLE tabletwo.dbf
&&菜單-考試-計算-table3
SELECT Xuesheng.學號, Xuesheng.姓名, Chengji.數學, Chengji.英語,;
Chengji.信息技術;
FROM xuesheng INNER JOIN chengji ;
ON Xuesheng.學號 = Chengji.學號;
ORDER BY Xuesheng.學號 DESC;
INTO TABLE table3.dbf
alter table table3 add 等級 c(4)
close all
use table3
do while not eof()
do case
case 數學>=60 and 英語>=60 and 信息技術>=60 and (數學+英語+信息技術)/3>=90
replace 等級 with "優(yōu)"
case 數學>=60 and 英語>=60 and 信息技術>=60 and (數學+英語+信息技術)/3>=80 and (數學+英語+信息技術)/3<90
replace 等級 with "良"
case 數學>=60 and 英語>=60 and 信息技術>=60 and (數學+英語+信息技術)/3>=70 and (數學+英語+信息技術)/3<80
replace 等級 with "中"
case 數學>=60 and 英語>=60 and 信息技術>=60 and (數學+英語+信息技術)/3<70
replace 等級 with "及格"
otherwise
replace 等級 with "差"
endcase
skip
enddo
&&表單的查詢結賬日期-“顯示”
jzrq=ctod(thisform.text1.value)
thisform.grid1.recordsource="SELECT 結賬表.顧客序號, 結賬表.顧客姓名, 結賬表.單位, 結賬表.消費金額;
FROM 結賬表;
WHERE 結賬表.結賬日期 = jzrq;
ORDER BY 結賬表.消費金額 DESC;
INTO TABLE tabc.dbf"
相關推薦:北京 | 天津 | 上海 | 江蘇 | 山東 |
安徽 | 浙江 | 江西 | 福建 | 深圳 |
廣東 | 河北 | 湖南 | 廣西 | 河南 |
海南 | 湖北 | 四川 | 重慶 | 云南 |
貴州 | 西藏 | 新疆 | 陜西 | 山西 |
寧夏 | 甘肅 | 青海 | 遼寧 | 吉林 |
黑龍江 | 內蒙古 |