I need to make basically this without using the "Group by"
SELECT idEmploye , COUNT(*) AS nbrProjet
FROM ressourcesprojet_
GROUP BY idEmploye
HAVING COUNT(*) > 1;
My Database code for creating it : https://sourceb.in/JePvGUccpU
Things i tried :
SELECT e.idEtape, e.idProjet, e.dateDebut, e.dateFin
FROM (
SELECT idProjet, dateDebut, dateFin
FROM Projet) AS p
RIGHT JOIN EtapexProjet AS e
ON e.dateDebut > p.dateDebut AND e.dateFin > p.dateFin
ORDER BY p.idProjet;
SELECT E.idEmploye ,
(SELECT COUNT(idProjet)
FROM ressourcesprojet_
Where E.idEmploye = idEmploye) AS nbrProjet
From employe_ E;
SELECT idEmploye
FROM ressourcesprojet_ WHERE 1 < (
SELECT COUNT(idProjet)
FROM ressourcesprojet_
where idEmploye = idEmploye);
I just can't wrap my head around it
The reason why you want, would affect if this is usable. Here is an example, which technically doesn't use the grouping, but if you added any other columns would easily require it:
P.S - I have to assume this is either a puzzle or test question
Alternative Edit:
This results in the following being returned: