View Full Version : Count Fields


Anauz
07-16-2001, 02:45 AM
Hi All

Desperately need some help.

I have two tables Company(t1), Fleet(t2)
Each company can have n aircrafts.
What i want to do is count and total the different types of aircraft each Company has.....can anyone help?


Thanx in advance

Rich
07-16-2001, 04:40 AM
On a report or in a query?

Pat Hartman
07-16-2001, 05:57 AM
You can do this in a report by suppressing the detail lines and just showing the group footers or in a query.

query:
Select t1.Company, t2.AircraftType, Count(*) As CountOfAircraft
From Company as t1 Inner Join Fleet as t2 on t1.Company = t2.Company
Group by t1.Company, t2.AircraftType;

Anauz
07-18-2001, 06:44 AM
Thanks Pat, worked fine