急求一SQL语句? 我来个效率比较差的select count( select code distinct from table where type=1), count( select code distinct from table where type=0) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select type, count(*) count from (select distinct type, code from table) A 不好意思,少写了group byselect type, count(*) count from (select distinct type, code from table) A group by type 呵呵 我自己也捣鼓出来了(和NoThiNg2050(子虚乌有)的答案一样):谢谢两位的回复select count(*) as count from (select distinct type,code from table) as tongji group by type; 国外windows 主机 请将 php.ini 中的 short_open_tag 设置为 On,否则无法继续安装 PHP学习交流群,已有100多人的高级群:87768463 不交流者勿进!谢谢 一个关于数据库关联输出的问题 请问PHP如何处理会员在线? 送分 请问 bcc1o什么意思? 怎么让内容 横向排列 ◇◆MySQL访问问题!!◇◆ 抓取新闻的,真强,好像还用到了xml apache的虚拟主机问题,我这么配怎么不好使呢?:( 验证码图片不显示 高分急求mysql innodb的数据恢复问题 熬了一夜也没想通的问题,在线等
select type, count(*) count from (select distinct type, code from table) A group by type
select count(*) as count from (select distinct type,code from table) as tongji group by type;