List:General Discussion« Previous MessageNext Message »
From:Venugopal Rao Date:May 3 2010 4:37am
Subject:How to Get Running Totals.
View as plain text  
I am trying to get running totals for the following:
Project Code---R&D---STP--RunningTotal
I tried to follow the examples available on the site but it is giving errors.
I am using java as a middleware and mysql as back end.
I am trying ot use backend query for getting the results.
response with examples will be more helpful.
With regards,
VR Venugopal Rao

--- On Wed, 28/4/10, Jay Blanchard <jblanchard@stripped> wrote:

From: Jay Blanchard <jblanchard@stripped>
Subject: RE: Pivot Query in
To: "VR Venugopal Rao" <venugopal.vellore@stripped>, "MySQL"
Date: Wednesday, 28 April, 2010, 4:57 PM

Date, ProjectCode Building, Number of Copies

I want to get a Connsolidate Report of 

Project Code   R&D   STP


(Group by Project Code)(Sumtotal Building wise).

I have tried to execute the following code :

select pcode, building, sum(ncopies) from request group by

It is giving the following repott



Here there is a repetition of pcode,

How can I avoid this. I want to get the Building Name on top as Column
and bottom I should get the Count.

We would need to see some of the raw data to help you but this older
article may point you in the right direction with crosstab (pivot)

MySQL General Mailing List
For list archives:
To unsubscribe:

Pivot Query in VR Venugopal Rao28 Apr
  • Re: Pivot Query innwood28 Apr
  • RE: Pivot Query in Jay Blanchard28 Apr
    • Re: Pivot Query inPeter Brawley28 Apr
    • Pivot Query in MySQLVR Venugopal Rao29 Apr
    • How to Get Running Totals.Venugopal Rao3 May
      • Re: How to Get Running Totals.Peter Brawley3 May