MySQL Forums
Forum List  »  Newbie

Re: Specify order before group?
Posted by: Callum Macdonald
Date: June 27, 2005 12:23PM

I've managed to sort this with a subquery:

SELECT * FROM (SELECT * FROM UserActions ORDER BY Time DESC) AS Actions GROUP BY UserID ORDER BY Time DESC;

I'm not sure if it's the most graceful or efficient solution, but it does work.


chmac.

Options: ReplyQuote


Subject
Written By
Posted
Re: Specify order before group?
June 27, 2005 12:23PM
ben
November 13, 2005 09:07PM


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.