MySQL Forums
Forum List  »  Newbie

Re: Specify order before group?
Posted by: ben
Date: November 13, 2005 09:07PM

I just figured this out and it may or may not work. I haven't even verified that it will work for my situation, but it's worth a shot:

SELECT *,COUNT(*) FROM (SELECT * from actions order by date DESC) AS actions GROUP BY ip;

Hope this helps a bit.

Options: ReplyQuote

Written By
Re: Specify order before group?
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.