The subquery after IN
must return only 1 column. You are returning MatriculeEmploye, COUNT(IdAppartL)
so 2 columns. Your query should be something like:
Select e.PrenomEmploye, e.NomEmploye, COUNT(g.IdAppartL)
From Employe e
INNER JOIN GererLocationAppart g ON g.MatriculeEmploye=e.MatriculeEmploye
GROUP BY 1,2;
Note that that this query will merge employees that have the same (Prenom, Nom) couple, so you may also want to add e.MatriculeEmploye to the SELECT and GROUP BY clause (GROUP BY 1,2,3
if you change your select to SELECT e.MatriculeEmploye, e.Prenom, ...
).