用SQL语句实现 查询年龄大于20岁的学生点总学生的比例?谢谢

来源:百度知道 编辑:UC知道 时间:2024/06/25 02:46:13
表结构 :
年龄,学号,姓名

表结构是怎么样的?
要不然,别人怎么给你语句呢?

select (select count(*) from Table1 Where Year>20)*100.0/(select count(*) from Table1) as 百分比

select count(select * from Table1 Where Year>20) as 百分比 from Table1

select * age>"20"....
set count1="?"(age>"20"....)
count3=count1/count