View previous topic :: View next topic |
Author |
Message |
ska
Joined: 13 Dec 2004 Posts: 1
|
Posted: Mon Dec 13, 2004 10:21 am Post subject: SQL Question - Select customers with more than 3 orders... |
|
|
Hi,
I have a table called ORDERS in a SQL Server 2000 database and I need to get a list of all the customers with more than 3 orders. Here is my ORDERS table structure:
OrderID INT PK
CustomerID INT
OrderDate DATETIME
OrderAmount FLOAT
Do you know how to select all customers (CustomerID) appearing more than 3 times in the ORDERS table?
Thanks _________________ Ska Forever :/ |
|
Back to top |
|
|
paul
Joined: 11 Oct 2004 Posts: 128
|
|
Back to top |
|
|
x-raysteve
Joined: 01 Feb 2006 Posts: 53
|
Posted: Wed Feb 01, 2006 7:10 pm Post subject: |
|
|
Learn something new the other day. I had something I was trying to debug the other day and this would have come in helpful. I never even heard of the having command before. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|