J
JMSatMetro
I tried posting this question in the Query specific portion of this
discussion board with no answers....
I've got a query which produces a recordset that I'd like to extract the
statistical mode of for a particular field. But not the mode of ALL records,
but the mode for each unique fkFranchiseID. Therefore, I need a subquery.
My primary query is:
SELECT tblOriginTAZ.fkFranchiseID, qryArcUniverseMin.TAZd,
tblFacilities.Facility
FROM (qryArcUniverseMin INNER JOIN tblOriginTAZ ON qryArcUniverseMin.TAZo =
tblOriginTAZ.TAZo) INNER JOIN tblFacilities ON qryArcUniverseMin.TAZd =
tblFacilities.TAZd
ORDER BY tblOriginTAZ.fkFranchiseID;
.....that I'd like to write a subquery on the TAZd field such that it
extracts the MODE TAZd for each fkFranchiseID.
So, the subquery would look something like:
SELECT tblOriginTAZ.fkFranchiseID, qryArcUniverseMin.TAZd,
tblFacilities.Facility
FROM (qryArcUniverseMin INNER JOIN tblOriginTAZ ON qryArcUniverseMin.TAZo =
tblOriginTAZ.TAZo) INNER JOIN tblFacilities ON qryArcUniverseMin.TAZd =
tblFacilities.TAZd
WHERE qryArcUniverseMin.TAZd = SELECT <<SQL implementing mode???>> AS T
WHERE T.fkFranchiseID = [qryAcrUniverseMin].fkFranchise
ORDER BY tblOriginTAZ.fkFranchiseID;
What now do I put in place of the <<SQL implementing mode???>> piece???!!!!!
discussion board with no answers....
I've got a query which produces a recordset that I'd like to extract the
statistical mode of for a particular field. But not the mode of ALL records,
but the mode for each unique fkFranchiseID. Therefore, I need a subquery.
My primary query is:
SELECT tblOriginTAZ.fkFranchiseID, qryArcUniverseMin.TAZd,
tblFacilities.Facility
FROM (qryArcUniverseMin INNER JOIN tblOriginTAZ ON qryArcUniverseMin.TAZo =
tblOriginTAZ.TAZo) INNER JOIN tblFacilities ON qryArcUniverseMin.TAZd =
tblFacilities.TAZd
ORDER BY tblOriginTAZ.fkFranchiseID;
.....that I'd like to write a subquery on the TAZd field such that it
extracts the MODE TAZd for each fkFranchiseID.
So, the subquery would look something like:
SELECT tblOriginTAZ.fkFranchiseID, qryArcUniverseMin.TAZd,
tblFacilities.Facility
FROM (qryArcUniverseMin INNER JOIN tblOriginTAZ ON qryArcUniverseMin.TAZo =
tblOriginTAZ.TAZo) INNER JOIN tblFacilities ON qryArcUniverseMin.TAZd =
tblFacilities.TAZd
WHERE qryArcUniverseMin.TAZd = SELECT <<SQL implementing mode???>> AS T
WHERE T.fkFranchiseID = [qryAcrUniverseMin].fkFranchise
ORDER BY tblOriginTAZ.fkFranchiseID;
What now do I put in place of the <<SQL implementing mode???>> piece???!!!!!