record totals

  • Thread starter Thread starter john C
  • Start date Start date
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.
 
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]
 
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
 

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

Back
Top