View Full Version : Count issues


Access9001
03-03-2010, 09:47 AM
In a given store there are Managers and Overseers.

Not all stores have Managers, but I want to select all Overseers associated with a store only if there are no Managers.

The store name is "Store," person's name is "Person," their title is "Title," which can be anything, including Overseer or Manager.

I tried basically saying select store, name, title where the count of "Managers" in a given store is 0. How do I do this?

MSAccessRookie
03-03-2010, 10:44 AM
Sounds like you need a two part query here.
The Outer Query will select Each Store, Person, and Title WHERE the Title is "Overseer" AND the Store is IN the set that is returned by the Inner Query.

The Inner Query will select all stores HAVING a COUNT(managers)=0.
Try building the two Queries, and get back if you have more problems.