Complicated (?) Counting Query

markjohnson

Registered User.
Local time
Today, 02:43
Joined
Dec 13, 2012
Messages
10
Hi,

I have a databse that is meant to record complainants information.

I want to create a query that returns peoples information, but ONLY if they have contacted us more than once.

Is that possible? If so, how?

Thanks
 
Yes, by building a properly normalized database. You will have at least 2 tables--Complainants and ContactInstances. Complainants will store the data about a person (Name, address, etc.) and ContactInstances will store information about specific contacts they have with you.

You then create a LEFT JOIN query from Complainants into ContactInstances and count the number of ContactInstances they have. If its more than 1 then they show in the query.
 
Hi,

I have a databse that is meant to record complainants information.

I want to create a query that returns peoples information, but ONLY if they have contacted us more than once.

Is that possible? If so, how?

Thanks

This issue is probably not as difficult as it first seems to you. What you will need is a Totals Query using GROUP BY and COUNT() Statements. Read up on them and see if it begins to make sense to you. Of course you should get back with any questions.

-- Rookie
 

Users who are viewing this thread

Back
Top Bottom