How to SUM() from an offset through the end of the table?

Posted by keithjgrant on Stack Overflow See other posts from Stack Overflow or by keithjgrant
Published on 2010-04-12T17:02:43Z Indexed on 2010/04/12 18:03 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

If SELECT SUM(amount) FROM transactions ORDER BY order LIMIT 0, 50 sums the amount field for the first 50 records in a table, how do a sum all records after the first 50? In other words, I'd like to do something like SELECT SUM(amount) from transactions ORDER BY order LIMIT 50, *, but that doesn't work.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about sum