交叉查询的sql
来源:互联网 发布:剑灵读图慢怎么优化 编辑:程序博客网 时间:2024/06/06 00:22
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
select gwlb, count(casewhen(year(getdate())-year(rybirthday))between20and30thenryghend)as'20-30',
count(casewhen(year(getdate())-year(rybirthday))between30and40thenryghend)as'30-40',
count(casewhen(year(getdate())-year(rybirthday))between40and50thenryghend)as'40-50',
count(casewhen(year(getdate())-year(rybirthday))between50and60thenryghend)as'50-60',
count(casewhen(year(getdate())-year(rybirthday))between60and70thenryghend)as'60-70'
fromt_ry
groupbygwlb<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
sql:select gwlb, count(casewhen(year(getdate())-year(rybirthday))between20and30thenryghend)as'20-30',
count(casewhen(year(getdate())-year(rybirthday))between30and40thenryghend)as'30-40',
count(casewhen(year(getdate())-year(rybirthday))between40and50thenryghend)as'40-50',
count(casewhen(year(getdate())-year(rybirthday))between50and60thenryghend)as'50-60',
count(casewhen(year(getdate())-year(rybirthday))between60and70thenryghend)as'60-70'
fromt_ry
groupbygwlb<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 交叉查询的sql
- 交叉查询的sql
- sql 交叉表查询
- sql 交叉查询
- SQL 查询语句中交叉条件的应用!
- SQL 查询语句中交叉条件的应用!
- sql 时间重合查询,时间交叉查询
- T-SQL查询高级--理解SQL SERVER中非聚集索引的覆盖,连接,交叉和过滤
- T-SQL查询高级--理解SQL SERVER中非聚集索引的覆盖,连接,交叉和过滤
- T-SQL查询高级--理解SQL SERVER中非聚集索引的覆盖,连接,交叉和过滤
- SQl 实现动态交叉表查询
- SQL交叉表查询 如何实现
- sql server 2000 2005 交叉表查询
- 交叉编译器的信息查询
- ORACLE中 大数据表的交叉数据集的查询 SQL优化方法
- ACCESS JET SQL 分段或者交叉统计的查询语句怎么写?
- Oracle SQL/92标准的关联查询(内外连接、交叉连接)
- SQL透视查询(交叉查询)PIVOT in的值过多,或不确定时的处理方案
- SSH配置中Spring对Hib的自动事务处理
- 实现千万级数据的分页显示
- Spring事务处理的两种方式
- 最佳SQL基础
- 实现千万级数据的分页显示--整理资料并测试(转)
- 交叉查询的sql
- spring 编程入门十大问题解答
- Transact-SQL中游标名的作用域
- 查询分析器不能单步调试的的原因
- 移植注意事项
- Sql server一些常见性能问题的总结
- 对一大表(百万级以上)建立索引时应当注意的事项及提高性能的手段
- 查询中的N条记录,然后,对这N条记录排序
- 执行带嵌入参数的sql——sp_executesql