Count Fields (2 Viewers)

Anauz

Registered User.
Local time
Today, 22:47
Joined
Nov 14, 2000
Messages
81
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
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 17:47
Joined
Feb 19, 2002
Messages
43,486
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;
 

Users who are viewing this thread

Top Bottom