Hello everyone,
I have two sql server 2000 db tables with the following fields in each:

orders=====
orderid 
customerid 
orderdate
orderamt

customers========
customerid 
fname
lname

how can i query the total amount (sum(orderamt)) purchased by customers 
who placed THEIR FIRST ORDER in a given time period? I have been 
successfull in getting this info for customers who have placed ONE OF 
THEIR ORDERS in a time period, but i do not know how to get the first 
order for each customer. 

Any help will be much appreciated!

--------------------------------------------
Andres Leon
[EMAIL PROTECTED]
Vitacost.com
2049 High Ridge Road
Boynton Beach, Fl 33426
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to