欢迎来到一句话经典语录网
我要投稿 投诉建议
当前位置:一句话经典语录 > 形容句子 > 形容统计的句子

形容统计的句子

时间:2016-06-15 08:18

一个统计的语句大家看看。

select seg, count(men) as men, count(women) as women, (count(men)+count(women))as total from table1 group by ((age-1)\\\/10) as seg

如何写出相应的统计语句?

写个存储过程将行拆分为列放入到临时表后再统计吧。

比如1 a,b,c,d拆分为4列:1 a1 b1 c1 d然后对临时表进行统计select pro,count(1) from tb group by pro这是最好的办法

声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。联系xxxxxxxx.com

Copyright©2020 一句话经典语录 www.yiyyy.com 版权所有

友情链接

心理测试 图片大全 壁纸图片