MySQL Forums
Forum List  »  Newbie

Re: GROUP BY with multiple columns
Posted by: Peter Brawley
Date: February 24, 2009 07:19PM

Something like ...
SELECT <desired column list> ...
FROM clip a
JOIN (
  SELECT MAX(id) AS id, clipID, statusID
  FROM clipStatusLookup
  GROUP BY statusID, clipID
) b ON a.ID=b.clipID
ORDER ON ...

Options: ReplyQuote


Subject
Written By
Posted
February 24, 2009 06:25PM
Re: GROUP BY with multiple columns
February 24, 2009 07:19PM


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.