使用find_by _sql的困惑

使用find_by _sql的困惑

使用
find(:all,sum(:price),:php?name=group" onclick="tagshow(event)" class="t_tag">group=>:name)

可以
使用

find_by_sql("select hsks.* sum(price) from hsks where group by name")

出现
Mysql::Error: #42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sum( price)from hsks where group by name' at line 1: select hsks.* sum(:price)from hsks where group by name

请高人帮助解惑?
hsks.*改成*
还是不行啊,可能不是这个原因。
http://dev.yesky.com/230/2669730.shtml
find_by_sql("select hsks.* sum(price) from hsks where group by name")中是不是少了一个逗号
"SELECT hsks(*), SUM(#{price}) FROM hsks GROUP BY NAME"
把你写的sql放到数据库中 看看 能找到不?