sum()的问题 select type,name,sum(qty)from table1group by type,name 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上正解.也可以直接select type,name,sum(qty)from table1group by name 或者select type,name,sum(qty)from table1group by type看你的表好像按type和name分组都可以 select type,name,sum(qty) from table1 group by type; select type,name,sum(qty) from table1 group by type,name; select type,name ,sum(qty) from tbgroup by type,name; mysql_real_query总是返回1 数据分类汇总问题,请高手指点,高分重谢 数据表应用索引 大家可以解釋一下UNIQUE的意思。@_@ 初涉Mysql,不知怎么使用,请教各位大侠,送100分。 高分求助:有3中以frm,myd,myi后缀的数据库文件各是什么意思,我怎样将他们挂在MYSQL数据库上 mysql主从同步失败 表中数据复制 超简单SQL语句问题 为什么mysql内存突然占用这么大 查询问题 MySqlCommand. Parameters.AddWithValue() 插入数据为null
也可以直接
select type,name,sum(qty)
from table1
group by name
或者
select type,name,sum(qty)
from table1
group by type
看你的表好像按type和name分组都可以
group by type,name;