record totals

J

john C

I have a database the has two tables linked via an
account number. The first table consists of the customer
informations such as name, address, etc. the second
table has customer's purchase information. I'm trying to
create a query that will return all customers that have
more than 3 records of purchases history. Any
suggestion? Thanks.
 
J

John Vinson

I have a database the has two tables linked via an
account number. The first table consists of the customer
informations such as name, address, etc. the second
table has customer's purchase information. I'm trying to
create a query that will return all customers that have
more than 3 records of purchases history. Any
suggestion? Thanks.

Create a Query joining the two tables. Change it to a Totals query
using the Greek Sigma icon on the toolbar (looks like a sideways M);
select whatever fields you want to see from the customer table, and
only the CustomerID from the purchases table. Leave the default Group
By on the Customers fields, and change it to Count on the Purchases
field.

Put a criterion of >3 on this count, and you should get what you want!

John W. Vinson[MVP]
 
D

dj

john said:
I have a database the has two tables linked via an
account number. The first table consists of the customer
informations such as name, address, etc. the second
table has customer's purchase information. I'm trying to
create a query that will return all customers that have
more than 3 records of purchases history. Any
suggestion? Thanks.
make the query with purchase include
customerid -- salestable -- number -- descending --criteria >=3
customerid -- salestable -- groupby
the query gives the total number if >=3 and the customersaccount

my purchase table had :
pk customerID (autonumber)
Customer account N°
Details
 
Top