caitliniag
Technical User
I am writing a statistical report for a weekly reporting database and need to include the median as well as the average in the report. The SQL for the report is:
SELECT vw_a.Assessor, Count(vw_a.Award) AS CountOfAward, Avg(vw_a.Award) AS AvgOfAward, Max(vw_a.Award) AS MaxOfAward, Min(vw_a.Award) AS MinOfAward
FROM vw_a
GROUP BY vw_a.Assessor
ORDER BY vw_a.Assessor;
vw_a is a query that contains two fields:
Assessor - Text
Award - Currency (there can be many Awards for each Assessor)
What I would like is to add another item to my select clause like:
Median(vw_a.Award) as MedianOfAward
with a VBA module to calculate the median. How can I do this?
Thanks
Caitlin
SELECT vw_a.Assessor, Count(vw_a.Award) AS CountOfAward, Avg(vw_a.Award) AS AvgOfAward, Max(vw_a.Award) AS MaxOfAward, Min(vw_a.Award) AS MinOfAward
FROM vw_a
GROUP BY vw_a.Assessor
ORDER BY vw_a.Assessor;
vw_a is a query that contains two fields:
Assessor - Text
Award - Currency (there can be many Awards for each Assessor)
What I would like is to add another item to my select clause like:
Median(vw_a.Award) as MedianOfAward
with a VBA module to calculate the median. How can I do this?
Thanks
Caitlin