[AccessD] crosstab query by decades...

Kostas Konstantinidis kost36 at otenet.gr
Sat Dec 2 11:28:30 CST 2017


Hi all,

I use a crosstab query to count the total films (group by short and long)
per year but what I need is to count the same in decades starting from 1914
to 2017 e.g 
1914/1919 -- 4
1920/1929 -- 8
.... 
2000/2017 -- 186
The 'year' is not a date but a simple number field.
Any help how to do this?

TRANSFORM Count(MT_films.[ID_films]) AS CountOfID_films
SELECT MT_films.[kind_movie], Count(MT_films.[ID_films]) AS [Total Of
ID_films]
FROM MT_films
GROUP BY MT_films.[kind_movie]
PIVOT MT_films.year;

Thank's
/kostas



More information about the AccessD mailing list