July 1, 2011 at 2:36 am
hi
I'm try to sum the following columns{see query below}( CGTResults.UsableCapitalGain and CGTResults.UsableCapitalLoss).
I would like which column to GROUP BY or what aggregate function should a add.
Thanks
SELECT CGTResults.UsableCapitalGain, CGTResults.UsableCapitalLoss, CGTResults.BaseCost, CGTResults.Proceeds, CGTResults.ExtraordDividend, FUND.FundName,
ClientID.ClientCode, CGTInstrumentIDs.SecurityCode, InstrumentHoldings.ActionType, InstrumentHoldings.EffectiveDate, InstrumentHoldings.CurrencyWAV,
CGTResults.CGTTransID
FROM CGTInstrumentIDs INNER JOIN
CGTResults ON CGTInstrumentIDs.CurrencyCode = CGTResults.CurrencyCode INNER JOIN
ClientID ON CGTResults.CGTClientID = ClientID.CGTClientID INNER JOIN
TaxFundClients ON ClientID.CGTClientID = TaxFundClients.CGTClientID INNER JOIN
FUND ON TaxFundClients.TaxFundID = FUND.TaxFundID INNER JOIN
InstrumentHoldings ON CGTResults.CGTTransID = InstrumentHoldings.CGTTransID
WHERE InstrumentHoldings.ActionType = '8'
July 1, 2011 at 3:00 am
Sorted Thanks
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy