Hi,
How can I construct a query that would give me a percentage,
eg - I would like to replace the hardcoded integer value 1234567,
with a calculated SUM figure. The integer 1234567 is the SUM of
all the Packets in the whole table.
SELECT SrcIp,
SUM(Packets),
Chris Andrew writes:
I would like to replace the hardcoded integer value 1234567,
with a calculated SUM figure.
SELECT SrcIp,
SUM(Packets),
SUM(Packets)/1234567*100 AS Percentage
FROM tblIp
GROUP BY SrcIp;
Either divide it into two queries and use the result
of the first