|
|
 |
专题栏目 |
 |
 |
相关文章 |
 |
|
|
|
|
 |
交叉查询的sql |
热 |
|
| 交叉查询的sql |
|
作者:zhangA 文章来源:不详 点击数: 更新时间:2007-11-14 12:56:06  |
|
sql: select gwlb, count(case when (year(getdate())-year(rybirthday)) between 20 and 30 then rygh end) as ''''20-30'''', count(case when (year(getdate())-year(rybirthday)) between 30 and 40 then rygh end) as ''''30-40'''', count(case when (year(getdate())-year(rybirthday)) between 40 and 50 then rygh end) as ''''40-50'''', count(case when (year(getdate())-year(rybirthday)) between 50 and 60 then rygh end) as ''''50-60'''', count(case when (year(getdate())-year(rybirthday)) between 60 and 70 then rygh end) as ''''60-70'''' from t_ry group by gwlb
|
|
| 文章录入:mintao 责任编辑:mintao |
|
|
上一篇文章: 最佳SQL 基础 下一篇文章: Transact-SQL中游标名的作用域 |
|
|
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |
|
注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网] |
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!) |
| |
|
|
|
|