在同一字段上不同筛选条件下如何输出到同一行 seelct type,sum(Num),sum(case when date<'2004-4-4' then num else 0 end)from 表group by type 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select type,sum(Num),sum(case when datediff(dd,[date],'2004-4-4')>0 then num else 0 end)from 表group by type seelct type,sum(Num) as Num,sum(case when date<'2004-4-4' then num else 0 end) as Num_Datefrom 表group by type 请教简单问题 [比这个更强的语句] 100分,给数据 关于触发器的问题 MYSQL可以按照两个字段差排序吗? 三个复选框的SQL语句该如何写呀? 求子查询的基本语法 关于同步两个表之间的某个字段的疑问,速度结贴 幫忙,簡單的SQL文 请问如何在一张表里用sql随机的查找一条记录? 怎么知道数据库(pub)里是否应经存在表table1呢,用语句写出来。谢谢各位! 数据库的设计 如何获得倒数第二条记录?
from 表
group by type
from 表
group by type