Hello, im trying to get the percentage of one field, meaning, to divide the field in the sum of that field.
the thing. the fields are also getting by a query :
select
Query,
Frequency,
Frequency/sum(Frequency) as FreqPerc,
Clicks,
BuyClicks
from (
SELECT top 10 Query,
SUM(Frequency) AS Frequency,
SUM(Clicks) AS Clicks,
SUM(BuyClicks) AS BuyClicks
FROM T_ANLX_REPORT_FRONT_QUERY
where StartTime >= 0 AND EndTime<= 555555555555
GROUP BY Query ) subq
group by subq.Query, subq.Frequency,subq.Clicks, subq.BuyClicks
somehow the Frequency field is equal to the FreqPerc.
what seems to be the problem ?
thanks.
the thing. the fields are also getting by a query :
select
Query,
Frequency,
Frequency/sum(Frequency) as FreqPerc,
Clicks,
BuyClicks
from (
SELECT top 10 Query,
SUM(Frequency) AS Frequency,
SUM(Clicks) AS Clicks,
SUM(BuyClicks) AS BuyClicks
FROM T_ANLX_REPORT_FRONT_QUERY
where StartTime >= 0 AND EndTime<= 555555555555
GROUP BY Query ) subq
group by subq.Query, subq.Frequency,subq.Clicks, subq.BuyClicks
somehow the Frequency field is equal to the FreqPerc.
what seems to be the problem ?
thanks.