Wild guess...
select sum(score) from (select score from exams limit 20,10)
--
With kind regards,
\/\//\ Wim,
W.A. ten Brink
On 8/2/06, agneady <[EMAIL PROTECTED]> wrote:
>
> Let's say I have a query like this one:
>
> select score from exams limit 20,10
>
> So, it returns the scores for records 20-29 from the exams table. Now,
> I want the sum of these returned scores. If I use:
>
> select sum(score) from exams
>
> it returns the sum of all scores. What I want is the sum of scores x
> to y only. Can this be done with a MySQL query? I know I can do it in
> PHP easily, but I want to do it through a query if possible.
>
>
>
>
>
>
> The php_mysql group is dedicated to learn more about the PHP/MySQL web
> database possibilities through group learning.
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
[Non-text portions of this message have been removed]
The php_mysql group is dedicated to learn more about the PHP/MySQL web database
possibilities through group learning.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php_mysql/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/