[AccessD] crosstab query by decades...

Kostas Konstantinidis kost36 at otenet.gr
Sat Dec 2 12:28:44 CST 2017


Forget... solved replacing year with switch([year] between 1914 and 1919;
"1914-1919".. etc)

Sorry
/kostas

-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
Kostas Konstantinidis
Sent: Saturday, December 2, 2017 7:29 PM
To: 'Access Developers discussion and problem solving'
<accessd at databaseadvisors.com>
Subject: [AccessD] crosstab query by decades...

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

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list