Q11 done and tested

This commit is contained in:
nbillard 2022-12-10 15:04:57 +01:00
parent a07068a21d
commit 8271e66ce4
2 changed files with 23 additions and 4 deletions

View file

@ -75,6 +75,7 @@ INSERT INTO Personnel(nom, prenom, date_de_naissance, adress, date_de_recrutemen
-- --
----------------------------------------------------------------------
-- Nathan
INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
1,
DATE '2020-06-23',
@ -93,6 +94,12 @@ INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
DATE '2022-09-29'
);
INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
8,
DATE '2022-09-20',
DATE '2024-10-12'
);
----------------------------------------------------------------------
-- --
-- Scientifique --
@ -516,3 +523,8 @@ INSERT INTO Encadrement VALUES (
5
);
INSERT INTO Encadrement VALUES (
8,
2
);

View file

@ -6,7 +6,7 @@
--SELECT COUNT(idPublication) as nbCollab FROM Publication
--WHERE classeConf = 'A';
-- Nathan Q1
-- Nathan Q1 tested
SELECT Personnel.nom, Scientifique.grade FROM Personnel, Scientifique
WHERE idPersonnel = idScientifique AND idPersonnel IN (
SELECT idScientifique FROM Encadrement
@ -40,7 +40,7 @@ RIGHT JOIN Publie_Externe pe ON pe.idAuteurExterne = ae.idAuteurExterne
JOIN Publication pub ON pub.idPublication = pe.idPublication
WHERE pub.classeConf = 'A';
-- Nathan Q5
-- Nathan Q5 tested
SELECT idDoctorant, COUNT(idPublication) FROM Publie_Doctorant
GROUP BY idDoctorant;
@ -54,7 +54,7 @@ GROUP BY idDoctorant
SELECT COUNT(*) FROM Doctorant
WHERE date_soutenance IS NOT NULL;
--Nathan Q7
--Nathan Q7 tested
SELECT nom, prenom FROM Personnel
WHERE idPersonnel IN (
SELECT idScientifique FROM Scientifique
@ -75,7 +75,7 @@ NOT IN ( (SELECT idScientifique
FROM Encadrement)
);
-- Nathan Q9
-- Nathan Q9 tested
SELECT nom, prenom FROM Personnel
WHERE idPersonnel IN (
SELECT idScientifique FROM Scientifique
@ -96,6 +96,13 @@ RIGHT JOIN Personnel p ON d.idDoctorant=p.idPersonnel
GROUP BY e.idDoctorant, nom, prenom
HAVING COUNT(DISTINCT s.idScientifique)=1;
-- Nathan Q11 tested
SELECT idPersonnel, nom, prenom, nbEtudiant FROM Personnel, (
SELECT idScientifique, COUNT(DISTINCT idDoctorant) AS nbEtudiant FROM Encadrement
GROUP BY idScientifique
) AS Classe
WHERE nbEtudiant >= 2 AND idPersonnel = idScientifique;
-- Axel Q12
SELECT idEnseignant FROM Enseignant_Chercheur ec
RIGHT JOIN Publie_Scientifique ps ON ps.idScientifique = ec.idScientifique