Query HELP!!!

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

Guest

Does anyone know how to setup a query or write a SQL statement for this: I
have a query that has multiple customers and dates of which they purchased an
item. I need to query this query to return the first date, for each
customer, regardless of what they purchased. In this example (below), I
would need a query to return the purchase date record of '01/01/05' and not
any others thereafter.

Cust Purch Dt
112 01/01/05
112 03/15/05
112 07/18/06

Can anyone help??? Thanks!
 
Does anyone know how to setup a query or write a SQL statement for this: I
have a query that has multiple customers and dates of which they purchased an
item. I need to query this query to return the first date, for each
customer, regardless of what they purchased. In this example (below), I
would need a query to return the purchase date record of '01/01/05' and not
any others thereafter.

Cust Purch Dt
112 01/01/05
112 03/15/05
112 07/18/06

Can anyone help??? Thanks!

SELECT tblBasicData.Cust, Min(tblBasicData.PurchDate) AS
MinOfPurchDate
FROM tblBasicData
GROUP BY tblBasicData.Cust
ORDER BY tblBasicData.Cust;
 
Back
Top