Counting Queries

Joined
Jan 27, 2009
Messages
4
Reaction score
0
I have three queries set up. I would like to show how many stores opened and closed per contract.

one query for opened stores:

SELECT tblContractStore.intContractID, Count(tblContractStore.intStoreID) AS CountOfintStoreID
FROM tblContractStore
WHERE (((tblContractStore.dtmCloseDate) Is Null))
GROUP BY tblContractStore.intContractID;

and one query for closed stores:

SELECT tblContractStore.intContractID, Count(tblContractStore.intStoreID) AS CountOfintStoreID
FROM tblContractStore
WHERE (((tblContractStore.dtmCloseDate) Is Not Null))
GROUP BY tblContractStore.intContractID;

When I add the queries above to the third query it only shows the contracts with closed stores. How do I get it to show how many stores were opened and closed per contract?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top