H haodan110 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-25 #1 有年龄、个人编号两个字段,要求出年龄在10~20,20~30,40~50的人数,新手上路,大家帮帮,小妹谢过
L lht123 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-25 #2 select count(个人编号) from table group by 个人编号 having 年龄 beteen 10 and 20
H haodan110 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-25 #3 要同时有10~20,20~30,40~50的人数
L lunsoon Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-25 #4 SELECT (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 10 AND 20) '10-20', (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 20 AND 30) '20-30', (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 40 AND 50) '40-50', SYSDATE FROM DUAL 宿舍里,没办法调试,应该可以
SELECT (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 10 AND 20) '10-20', (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 20 AND 30) '20-30', (SELECT COUNT(NO) FROM TABLE WHERE AGE BETWEEN 40 AND 50) '40-50', SYSDATE FROM DUAL 宿舍里,没办法调试,应该可以
H haodan110 Unregistered / Unconfirmed GUEST, unregistred user! 2006-09-25 #5 谢谢.由于论坛出错,我以为信息没发出去,让大家久等,sorry 呵呵.论坛出错结果144分用了4次