M
mbe
Hello,
I am translating an Access query to mysql and cannot find a mysql equivalent
to the functions "First()" and "Last()". Is there a mysql equivalent? Or do
you know an alternate way to get the first and last records within the group?
This is my Access sql:
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;
Thanks so much for your help!
I am translating an Access query to mysql and cannot find a mysql equivalent
to the functions "First()" and "Last()". Is there a mysql equivalent? Or do
you know an alternate way to get the first and last records within the group?
This is my Access sql:
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;
Thanks so much for your help!