Total Records

J

John C

I have 2 tables, one that contains customer info such as name, address etc.
and the second table contains customer's purchase history. The tables are
linked via customer id. I am trying to create a query that gives me all
customers with more than 3 purchases. Any suggestions! Thanks.
 
B

Brendan Reynolds

SELECT tblCustomer.CustomerID, tblCustomer.CustomerName,
Count(tblOrder.OrderNumber) AS CountOfOrderNumber
FROM tblCustomer INNER JOIN tblOrder ON tblCustomer.CustomerID =
tblOrder.CustomerID
GROUP BY tblCustomer.CustomerID, tblCustomer.CustomerName
HAVING (((Count(tblOrder.OrderNumber))>3));
 
Top