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.
 

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

Similar Threads

Group by Function & Min 1
Group By error message 2
Group By Question? 1
Problem with group by query over date range 1
Group by query question 1
selecting criteria 1
Min/Max Dates 1
dsum issue 1

Back
Top