18)then'18歲及以上'when(datediff(yy,csrq,getdate())=11)then'11歲'when(datediff(yy,csrq,getdate())=12)then'12歲'when(datediff(yy,csrq,getdate())=13)then'13歲'when(datediff(yy,csrq,getdate())=14)t" />

亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

一個group by例子

系統 2156 0

select ?
????
case ?
????????
when ?( datediff (yy,csrq, getdate ())? > ? 18 )? then ? ' 18歲及以上 ' ????????
????????
when ?( datediff (yy,csrq, getdate ())? = ? 11 )? then ? ' 11歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 12 )? then ? ' 12歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 13 )? then ? ' 13歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 14 )? then ? ' 14歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 15 )? then ? ' 15歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 16 )? then ? ' 16歲 '
????????
when ?( datediff (yy,csrq, getdate ())? = ? 17 )? then ? ' 17歲 '
????????
else ? ' 10歲及以下 '
????
end ? ' AgeStage ' ,
????
count ( * )? as ? ' Num ' ,?xbm? as ?Sex,
????XSLBM?
as ? ' Class ' ,MZM? as ? ' Nationality ' ,ZJXY? as ?Boarder
from ?stu_studentinfo
where ??Dept_ID?
in ?( select ?id? from ?sys_departments? where ?p_id?
in ?( select ?id? from ?sys_departments? where ?p_id? in ?( 252 , 258 , 277 , 279 )?
and ?gradeclass? = ? ' 初一年級 ' ))
group ? by ?
case ?
????
when ?( datediff (yy,csrq, getdate ())? > ? 18 )? then ? ' 18歲及以上 ' ????????
????
when ?( datediff (yy,csrq, getdate ())? = ? 11 )? then ? ' 11歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 12 )? then ? ' 12歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 13 )? then ? ' 13歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 14 )? then ? ' 14歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 15 )? then ? ' 15歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 16 )? then ? ' 16歲 '
????
when ?( datediff (yy,csrq, getdate ())? = ? 17 )? then ? ' 17歲 '
????
else ? ' 10歲及以下 '
end ,?xbm,XSLBM,MZM,ZJXY

?

一個group by例子


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 国内视频自拍 | 999精品久久久中文字幕蜜桃 | 全高清特级毛片 | 四虎一级片| 精品欧美一区二区三区免费观看 | 色偷偷尼玛图亚洲综合 | 亚洲视频一二区 | 欧美精品一区在线看 | 久久99精品久久久久久国产越南 | 91久久综合九色综合欧美亚洲 | 成人亚洲综合 | 亚洲精品久久久久网站 | 青草福利 | 免费的拍拍视频在线观看 | 日本精品中文字幕在线不卡 | 人人乳乳香蕉大免费 | 五月婷婷色视频 | 成年黄页免费大全网站 | 色婷婷免费视频 | 精品欧美一区二区三区精品久久 | 婷婷综合五月 | 奇米狠狠色 | 国产精品高清一区二区三区 | 日日操夜夜操狠狠操 | 中文亚洲字幕 | 一级午夜 | 中文字幕日韩高清 | 伦理久久 | 国产精品一区二区三区久久 | 免费看在线爱爱小视频 | 尹人香蕉久久99天天 | 狠狠干奇米 | 亚洲精品麻豆一区二区 | 麻豆精品永久免费视频 | 成人国产免费 | 亚洲日本在线观看视频 | 神马午夜不卡影院 | 草草影院第一页yycccom | 国产一区二区三区在线视频 | 午夜精品久久久久久久四虎 | 亚洲久久视频 |