SELECT
  a.codeGcAssureur  AS codeGcAssureur,c.libelle AS garant,
  a.idClient AS idClient,a.numeroClient  AS numeroClient,
  CONCAT(b.nom,' ',IFNULL(b.prenoms,'')) AS souscripteur,
  a.id AS idPolice,a.numeroPolice AS numeroPolice,a.libellePolice AS libellePolice,
  a.dateEffet AS dateEffet,a.dateFin AS dateFin,a.codeEtape AS codeEtape,a.codeEtatPolice AS codeEtatPolice
  -- ,  a.primeFamille AS primeFamille, a.primeBeneficiaire AS primeBeneficiaire
FROM ((police a
LEFT JOIN clients b ON ((b.id = a.idClient)))
LEFT JOIN gc_assureur c ON ((c.codeGcAssureur = a.codeGcAssureur)))
WHERE a.codeApporteur="EC" AND c.typeGarant="1"



-- select * from gc_assureur where typeGarant="1"
SELECT * FROM apporteur WHERE typeGarant="1"