MySQL: How can fetch SUM() of all fields in one Query?

Posted by takpar on Stack Overflow See other posts from Stack Overflow or by takpar
Published on 2010-05-12T10:24:19Z Indexed on 2010/05/14 10:14 UTC
Read the original article Hit count: 201

Filed under:
|
|
|

Hi,

I just want somthing like this:

select SUM(*) from `mytable` group by `year`

any suggestion?

(I am using Zend Framework; if you have a suggestion using ZF rather than pure query would be great!)

Update: I have a mass of columns in table and i do not want to write their name down one by one.


No Idea??

© Stack Overflow or respective owner

Related posts about mysql

Related posts about query