MySQL Forums
Forum List  »  Microsoft Access

First() and Last() in mySql
Posted by: marta.b.edmonds
Date: December 08, 2005 08:11AM

Hello,
I am trying to translate this Access query to mysql:
SELECT TransactionDetails.TransactionID, First(TransactionDetails.Q) AS FirstOfQ, Min(TransactionDetails.timeIN) AS MinOftimeIN, Last(TransactionDetails.Q) AS LastOfQ, Max(TransactionDetails.timeIN) AS MaxOftimeIN
FROM TransactionDetails
GROUP BY TransactionDetails.TransactionID;

Do you know what the mysql equivalent to Access' First() and Last() are?
I have not been able to find this anywhere - what I am trying to do is select the first and last records within each group in the query.

Thanks alot in advance!
M

Options: ReplyQuote


Subject
Views
Written By
Posted
First() and Last() in mySql
44808
December 08, 2005 08:11AM
18765
January 04, 2006 09:48AM
13720
April 17, 2006 10:32AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.