percentages problem: what am I doing wrong?

S

scubadiver

Hello,

this is my SQL:

SELECT Portfolio.Portfolio, Sum(Account.FaceVal) AS SumOfFaceVal,
Sum([faceval])/DSum('faceval','account') AS Percentage
FROM Portfolio INNER JOIN Account ON Portfolio.PortfolioID =
Account.PortfolioID
GROUP BY Portfolio.Portfolio;

These are my numbers

Portfolio SumOfFaceVal

Primary £179,011,115.21
Secondary £119,656,356.30
Tertiary £1,310,689,691.09

The percentages should be approximately

29%
20%
51%

but I get

11%
7%
81%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top