SELECT A.numeroDecompte, A.numeroLotDecompte, COUNT(0) AS nb
FROM p_facture A 
JOIN p_reglement B ON (B.numeroDecompte=A.numeroDecompte)
WHERE B.numeroLotDecompte!=A.numeroLotDecompte
GROUP BY A.numeroDecompte, A.numeroLotDecompte;

SELECT * FROM p_typedecompte

SELECT * FROM p_facture WHERE numeroLotDecompte="202205L002400"


SELECT DISTINCT codeAffection FROM  p_feuillemaladie WHERE codeAffection NOT IN (SELECT codeAffection FROM p_affection)


-- UPDATE p_feuillemaladie  SET codeAffection="990" WHERE codeAffection NOT IN (SELECT codeAffection FROM p_affection);


SELECT * FROM p_numerotationlotdecompte

SELECT * FROM p_facture WHERE  numeroFeuilleMaladie="24860"   -- CE1399


SELECT * FROM prestataire WHERE libelle LIKE '%fara%'


SELECT DISTINCT codePrestataire FROM p_facture WHERE numeroLotDecompte="202205L001576"

SELECT codeTypeDecompte,Libelle AS TypeDecompte FROM p_typedecompte

CALL `rechercheColonneLike`("codeSpecialite")


SELECT * FROM hp_medecin ORDER BY NOM
