removing unasked field from Q10
This commit is contained in:
parent
1b8af74789
commit
50da8ceda6
1 changed files with 16 additions and 13 deletions
29
request.sql
29
request.sql
|
|
@ -88,13 +88,14 @@ WHERE idPersonnel IN (
|
||||||
--Yasmine QUESTION 8 Testé
|
--Yasmine QUESTION 8 Testé
|
||||||
SELECT EC.idEnseignant,P.nom,P.prenom
|
SELECT EC.idEnseignant,P.nom,P.prenom
|
||||||
FROM Enseignant_chercheur EC, Personnel P
|
FROM Enseignant_chercheur EC, Personnel P
|
||||||
WHERE P.idPersonnel=EC.ididEnseignant
|
WHERE P.idPersonnel=EC.idEnseignant
|
||||||
NOT IN ( (SELECT idScientifique
|
AND EC.idEnseignant
|
||||||
FROM Publie_scientifique)
|
NOT IN ( (SELECT idScientifique
|
||||||
UNION
|
FROM Publie_scientifique)
|
||||||
(SELECT idScientifique
|
UNION
|
||||||
FROM Encadrement)
|
(SELECT idScientifique
|
||||||
);
|
FROM Encadrement)
|
||||||
|
);
|
||||||
|
|
||||||
-- Nathan Q9 tested
|
-- Nathan Q9 tested
|
||||||
SELECT nom, prenom FROM Personnel
|
SELECT nom, prenom FROM Personnel
|
||||||
|
|
@ -110,12 +111,14 @@ WHERE idPersonnel IN (
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Ronan Q10
|
-- Ronan Q10
|
||||||
SELECT e.idDoctorant, nom, prenom, COUNT(*) FROM Encadrement e
|
SELECT idDoctorant, nom, prenom FROM (
|
||||||
JOIN Scientifique s ON e.idScientifique=s.idScientifique
|
SELECT e.idDoctorant, nom, prenom, COUNT(*) FROM Encadrement e
|
||||||
JOIN Doctorant d ON e.idDoctorant=d.idDoctorant
|
JOIN Scientifique s ON e.idScientifique=s.idScientifique
|
||||||
RIGHT JOIN Personnel p ON d.idDoctorant=p.idPersonnel
|
JOIN Doctorant d ON e.idDoctorant=d.idDoctorant
|
||||||
GROUP BY e.idDoctorant, nom, prenom
|
RIGHT JOIN Personnel p ON d.idDoctorant=p.idPersonnel
|
||||||
HAVING COUNT(DISTINCT s.idScientifique)=1;
|
GROUP BY e.idDoctorant, nom, prenom
|
||||||
|
HAVING COUNT(DISTINCT s.idScientifique)=1
|
||||||
|
);
|
||||||
|
|
||||||
-- Nathan Q11 tested
|
-- Nathan Q11 tested
|
||||||
SELECT idPersonnel, nom, prenom, nbEtudiant FROM Personnel, (
|
SELECT idPersonnel, nom, prenom, nbEtudiant FROM Personnel, (
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue