·您的位置: 首页 » 资源教程 » 编程开发 » 数据库 » SQL交叉查询

SQL交叉查询

类别: 数据库教程  评论数:0 总得分:0
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
-= 资 源 教 程 =-
文 章 搜 索
关键词:
类型:
范围:
纯粹空间 softpure.com
Copyright © 2006-2008 暖阳制作 版权所有
QQ: 15242663 (拒绝闲聊)  Email: faisun@sina.com
 纯粹空间 - 韩国酷站|酷站欣赏|教程大全|资源下载|免费博客|美女壁纸|设计素材|技术论坛   Valid XHTML 1.0 Transitional
百度搜索 谷歌搜索 Alexa搜索 | 粤ICP备06033747号