Select sum(pagecount*pages)

Clayton
----- Original Message -----
From: "Ed Ventura" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 03, 2003 4:58 PM
Subject: Multiplying two columns and then adding up all the records.


> How do I multiply two columns and then add them all up from a resultset?
My
> database looks like this:
>
> CLIENT     PAGECOUNT     PAGES
> Xyzco      10            1
> Abcco      5             3
> Defco      3             6
>
> So I need to multiply PAGECOUNT X PAGES for each record and then add them
> all up to get a total. In this example I would need to multiply (10 x 1) +
> (5 x 3) + (3 x 6) = grandtotal.
>
> Thanks for any help,
> Ed.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
>  http://java.sun.com/products/jsp
>  http://archives.java.sun.com/jsp-interest.html
>  http://forums.java.sun.com
>  http://www.jspinsider.com
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to