SELECT 
	CodeG,garant,idPolice,police,codeGarantie,garantie,
	idAdherent,numeroAdherent,adherent,
	idbenef,numeroBeneficiaire,Beneficiaire,
	plafondIndividuel,consoIndividuel,
	plafondIndividuel  - consoIndividuel AS depassement,
	ROUND(consoIndividuel/plafondIndividuel*100,0) AS pourcentIndividuel
FROM alerte_depGarantie_plfFamille  
WHERE ROUND(plafondIndividuel/plafondIndividuel*100,0)  >= 85
-- AND (CASE WHEN "GNA" IS NULL THEN CodeG IS NOT NULL ELSE CodeG="GNA" END)  
-- AND (CASE WHEN 82 IS NULL THEN idPolice IS NOT NULL ELSE idPolice=82 END) 
-- AND codeGarantie="PHA" 	 
ORDER BY CodeG,idPolice,idAdherent,idbenef,pourcentIndividuel DESC ;


-- SELECT * FROM 