C
count countif
I would like to know how to use the countif statement in a query. I have run
one query which makes a table. I am now running smaller queries against this
table to count the number of records if the field named Decile = 9. Here is
the base query in SQL.
SELECT TblExtract_VICPOGMfg.HH, TblExtract_VICPOGMfg.Mfg_Brand,
Sum(TblExtract_VICPOGMfg.Units) AS SumOfUnits,
Sum(TblExtract_VICPOGMfg.Units) AS [Total Of Units] INTO
UnitSumByHouseholdDecile080910
FROM TblExtract_VICPOGMfg
GROUP BY TblExtract_VICPOGMfg.HH, TblExtract_VICPOGMfg.Mfg_Brand,
TblExtract_VICPOGMfg.Decile;
one query which makes a table. I am now running smaller queries against this
table to count the number of records if the field named Decile = 9. Here is
the base query in SQL.
SELECT TblExtract_VICPOGMfg.HH, TblExtract_VICPOGMfg.Mfg_Brand,
Sum(TblExtract_VICPOGMfg.Units) AS SumOfUnits,
Sum(TblExtract_VICPOGMfg.Units) AS [Total Of Units] INTO
UnitSumByHouseholdDecile080910
FROM TblExtract_VICPOGMfg
GROUP BY TblExtract_VICPOGMfg.HH, TblExtract_VICPOGMfg.Mfg_Brand,
TblExtract_VICPOGMfg.Decile;