B
brian
I have two queries which are being used to get a count of "Target Met" and
"Target Missed". Each query has a column for Person and a column with the
count. What I want to do is bring the two queries together to display three
columns (person, count met, count missed). When I run it, I'm not getting
the full dataset for the table (I add the two counts together and the total
is not equal to the # of records in the table). Can this be done (note that
there is no key)? Below are the queries being used:
TARGET MET QUERY
****************
SELECT Avg(FEB08.MINUTES) AS [Avg MINUTES], Count(*) AS [COUNT],
FEB08.PERFORMED_BY
FROM FEB08
WHERE (((FEB08.MINUTES)<=60))
GROUP BY FEB08.PERFORMED_BY;
TARGET MISSED QUERY
****************
SELECT Avg(FEB08.MINUTES) AS [Avg MINUTES], Count(*) AS [COUNT],
FEB08.PERFORMED_BY
FROM FEB08
WHERE (((FEB08.MINUTES)>60))
GROUP BY FEB08.PERFORMED_BY;
FINAL TARGET QUERY
****************
SELECT TARGET_MET_QUERY.PERFORMED_BY, TARGET_MET_QUERY.COUNT AS [# OF EVENTS
MET], TARGET_MISSED_QUERY.COUNT AS [# OF EVENTS MISSED]
FROM TARGET_MET_QUERY LEFT JOIN TARGET_MISSED_QUERY ON
TARGET_MET_QUERY.PERFORMED_BY=TARGET_MISSED_QUERY.PERFORMED_BY;
"Target Missed". Each query has a column for Person and a column with the
count. What I want to do is bring the two queries together to display three
columns (person, count met, count missed). When I run it, I'm not getting
the full dataset for the table (I add the two counts together and the total
is not equal to the # of records in the table). Can this be done (note that
there is no key)? Below are the queries being used:
TARGET MET QUERY
****************
SELECT Avg(FEB08.MINUTES) AS [Avg MINUTES], Count(*) AS [COUNT],
FEB08.PERFORMED_BY
FROM FEB08
WHERE (((FEB08.MINUTES)<=60))
GROUP BY FEB08.PERFORMED_BY;
TARGET MISSED QUERY
****************
SELECT Avg(FEB08.MINUTES) AS [Avg MINUTES], Count(*) AS [COUNT],
FEB08.PERFORMED_BY
FROM FEB08
WHERE (((FEB08.MINUTES)>60))
GROUP BY FEB08.PERFORMED_BY;
FINAL TARGET QUERY
****************
SELECT TARGET_MET_QUERY.PERFORMED_BY, TARGET_MET_QUERY.COUNT AS [# OF EVENTS
MET], TARGET_MISSED_QUERY.COUNT AS [# OF EVENTS MISSED]
FROM TARGET_MET_QUERY LEFT JOIN TARGET_MISSED_QUERY ON
TARGET_MET_QUERY.PERFORMED_BY=TARGET_MISSED_QUERY.PERFORMED_BY;