MySQL Forums
Forum List  »  General

Re: Help for a request - SELECT / LEFT JOIN & GROUPS
Posted by: Fei Tian
Date: October 22, 2016 11:36PM

Hi,

select t1.id,t1.nom,GROUP_CONCAT(t2.attributions) AS ATTRIBUTIONS,GROUP_CONCAT(t3.info order by t3.info asc separator ',') AS INFOS FROM personnes t1 left join attribs t2 on t2.id_personne=t1.id left join infos t3 on t3.id_personne=t1.id where t2.attributions=3 or t2.attributions is null group by t1.id,t1.nom;

is this OK?

Options: ReplyQuote


Subject
Written By
Posted
Re: Help for a request - SELECT / LEFT JOIN & GROUPS
October 22, 2016 11:36PM


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.