Código: Seleccionar todo
SELECT DISTINCT u.label AS u_label, s.nom AS s_nom, s.email AS s_email
FROM llx_categorie AS u, llx_categorie_societe AS cf, llx_societe AS s
LEFT JOIN llx_c_typent AS t ON s.fk_typent = t.id
LEFT JOIN llx_c_pays AS p ON s.fk_pays = p.rowid
LEFT JOIN llx_c_effectif AS ce ON s.fk_effectif = ce.id
LEFT JOIN llx_c_forme_juridique AS cfj ON s.fk_forme_juridique = cfj.code
WHERE u.rowid = cf.fk_categorie
AND cf.fk_societe = s.rowid
AND u.entity =1
AND u.type =2
