Access Query help needed

V

Victag

Please help me with this query if you are able? Not sure it is
possible what I would like to do, but I have created this query which
works as I expected:

SELECT DISTINCT Clients.Subnet
FROM Clients
WHERE Clients.Subnet in (Select Subnet from Clients where
Clients.SubnetExists = "SUBNETMISSING");

I would like my query to also show the count of how many times each
distinct subet appeared in the second select statement so my results
will show the subnet and how many clients on each subnet had a
SubnetExists value of "SUBNETMISSING".

Thanks in advance!
 
D

Danny J. Lesandrini

I think this should work. It's got a simpler WHERE clause too.

SELECT Subnet, Count(*) AS Total
FROM Clients
WHERE SubnetExists = "SUBNETMISSING"
GROUB BY Subnet
 

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