'select a,sum(f) from c group by a where e>=:e and e<=:e1'这句话错在哪? 好像是:group by 后不加where条件。group和where只能取其一。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 应该是:select a,sum(f) from c where e>=:e and e<=:e1group by a先写where 语句,再写group(:别忘了给我加分哦!) 那要对符合条件的进行求和,应该什么办呢?select 语句中有sum时,提示一定要有group by啊. 很简单。和我上面写的基本相同,但是因为你如果不用group by,则表明你不用分组求和。所以在select 后面的字段中,除了有sum()的字段外,不要有其他的字段即可。如:select sum(field1),sum(field2),sum(field3)..... from c where e>=:e and e<=:e1祝你成功! 求助,怎样在DELPHI中控制一个继电器? [Fatal Error] Could not create output file... 大家一起来谈谈用Delphi实现 连连看游戏 的一些问题啊...200分 原代码 请问程序如何使用自定义的鼠标,就像游戏中的那样 困扰了几天的问题,急,请高手们帮忙!up有分 急救:什么是空间数据库的定义? Listview问题------------------------- 串口通信问题,高手请进! 多线程的疑问?请各位大虾指教?! 请教:用DCOM开发三层应用 报表单元格
select a,sum(f)
from c
where e>=:e and e<=:e1
group by a
先写where 语句,再写group
(:别忘了给我加分哦!)
select 语句中有sum时,提示一定要有group by啊.
和我上面写的基本相同,但是因为你如果不用group by,则表明你不用分组求和。
所以在select 后面的字段中,除了有sum()的字段外,不要有其他的字段即可。
如:
select sum(field1),sum(field2),sum(field3).....
from c
where e>=:e and e<=:e1
祝你成功!