MySQL Forums
Forum List  »  Newbie

Re: Making query ONLY_FULL_GROUP_BY compatible
Posted by: Wim Roffel
Date: July 15, 2016 02:52AM

Thanks, that works.

But now I want to make it a little more complicated. I want a third field - description. Of course I could write

select id_category, max(name) as maxname, max(description) as maxdescription from category_table where id_lang=1 group by id_category order by maxname;

But the problem is that I could then get the name from a different row as the description - what is undesirable. How can I avoid that.

Options: ReplyQuote




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.