list of duplicate records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I do a query for duplicate records I do get a list of the duplicate
records, however, I only want the duplicate records listed once. Instead I
get the record say a customer listed as many times as the number of orders
entered. I only want list of the costomers that have placed more than one
order. So how do I get this single list of customers with more than one
entry? HELP.
 
That type of query should return the customer and the amount of orders he
made, and display only the customers with more then one order

SELECT MyTable.CustomerNum, Count(MyTable.OrderNum) AS CountOrderNum
FROM MyTable
GROUP BY MyTable.CustomerNum
HAVING Count(MyTable.OrderNum)>1

Its group by query when the order number used only to count
 

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