Group by and Min function

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

Guest

How do I:
1) Group a list of transactions by Item#. There are multiple Item# with
several transactions. Group_by???
2) Select the earliest date for each transaction in the group?

My output will give me every item with the earliest date date each item was
purchased.
thx
 
SELECT ItemNum, Min(PurchaseDate) as MinPurchDate
FROM tblTransactions
GROUP BY ItemNum;
 
My suggestion would be the SQL view of a query. This is the "queries" news
group. If you would like to see a value in a text box, you need to provide
more information.
 
Back
Top