delphi7中让edit里显示select count(student-sno) as 大于九十分的人数 from s

学习 时间:2026-11-10 10:58:03 阅读:3877
delphi7中让edit里显示select count(student_sno) as 大于九十分的人数 from score where total_score>90的百分比,就是大于九十分的人数占总人数的百分比,

最佳回答

细腻的心锁

魁梧的美女

2026-11-10 10:58:03

简单点可以这样写:select count(student_sno) as 大于九十分的人数 from score where total_score>90select count(student_sno) as 人数 from score 相除就可以了 再问: 代码怎么写???adoquery1。SQL。Add('(select cast(((select count(*) from score where course_cno='''+form1。Edit1。Text+''' and total_score >= 90) / (select count(*) from score where course_cno='''+form1。edit1。text+'''))*100 as varchar(10)) as 百分比 from score)');我这样写,运行的时候总是等于0,怎么回事??

最新回答共有2条回答

  • 踏实的猫咪
    回复
    2026-11-10 10:58:03

    简单点可以这样写:select count(student_sno) as 大于九十分的人数 from score where total_score>90select count(student_sno) as 人数 from score 相除就可以了 再问: 代码怎么写???adoquery1。SQL。Add('(select cast(((select count(*) from score where course_cno='''+form1。Edit1。Text+''' and total_score >= 90) / (select count(*) from score where course_cno='''+form1。edit1。text+'''))*100 as varchar(10)) as 百分比 from score)');我这样写,运行的时候总是等于0,怎么回事??

上一篇 我们分了快一个星期了··昨天女友突然打电话给我说叫我去接她下班·还说我们是朋友啊··到底是什么意思··我们以前很相爱的

下一篇 关联词语位置不当病句至少要写10个,今天晚上给30分.