MySQL Forums :: Microsoft Access :: First() and Last() in mySql

Advanced Search

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

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!

Options: ReplyQuote

Subject Views Written By Posted
First() and Last() in mySql 44168 marta.b.edmonds 12/08/2005 08:11AM
Re: First() and Last() in mySql 18615 Jeromy Dean 01/04/2006 09:48AM
Re: First() and Last() in mySql 13454 Steve Carter 04/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.