I've got a table structure a shown below:
Table1:
ID
Date
Location
Count
Say I wanted to run a query outputing the Count for each location with a date range:
SELECT Table1.Location, Count(Table1.Count) AS CountOfCount
FROM Table1
WHERE (((Table1.Date) Between #1/1/2001# And #2/1/2001#))
GROUP BY Table1.Location;
I would also like to output the 'CountOfCount' value % difference from the previous years data range (ie. 1/1/2000 and 2/1/2000) in the same query. How do I do this? An example of the output would be:
Location : Count 1/1/01 to 2/1/01 : % Diff from 1/1/00 to 2/1/00
loc1 : 100 : -2%
loc2 : 125 : +5%
,etc.
Table1:
ID
Date
Location
Count
Say I wanted to run a query outputing the Count for each location with a date range:
SELECT Table1.Location, Count(Table1.Count) AS CountOfCount
FROM Table1
WHERE (((Table1.Date) Between #1/1/2001# And #2/1/2001#))
GROUP BY Table1.Location;
I would also like to output the 'CountOfCount' value % difference from the previous years data range (ie. 1/1/2000 and 2/1/2000) in the same query. How do I do this? An example of the output would be:
Location : Count 1/1/01 to 2/1/01 : % Diff from 1/1/00 to 2/1/00
loc1 : 100 : -2%
loc2 : 125 : +5%
,etc.
Last edited: