Lets say I have an Access 2000 DB.
It has one table called MasterFile and one table called Model
Model contains one field that lists 18 different models of cars.
MasterFile contains the fields:
DatePurchased - the date the car was purchased
TModel - any ONE model from the Model table
I need a query that:
Lists all 18 models of cars and the COUNT of each Model purchased in one particular month.
It might look like this:
SELECT MasterFile.TModel, COUNT(MasterFile.Model) AS CountMod
FROM MasterFile
WHERE DatePart('m',MasterFile.DatePurchased) = ?
GROUP BY MasterFile.TModel
This query does not return all 18 different Models. It returns only those purchased in that particular Month.
Even if the COUNT is zero, I still need to see it.
It has one table called MasterFile and one table called Model
Model contains one field that lists 18 different models of cars.
MasterFile contains the fields:
DatePurchased - the date the car was purchased
TModel - any ONE model from the Model table
I need a query that:
Lists all 18 models of cars and the COUNT of each Model purchased in one particular month.
It might look like this:
SELECT MasterFile.TModel, COUNT(MasterFile.Model) AS CountMod
FROM MasterFile
WHERE DatePart('m',MasterFile.DatePurchased) = ?
GROUP BY MasterFile.TModel
This query does not return all 18 different Models. It returns only those purchased in that particular Month.
Even if the COUNT is zero, I still need to see it.