Q11 done and tested
This commit is contained in:
parent
a07068a21d
commit
8271e66ce4
2 changed files with 23 additions and 4 deletions
12
insert.sql
12
insert.sql
|
@ -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 (
|
INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
|
||||||
1,
|
1,
|
||||||
DATE '2020-06-23',
|
DATE '2020-06-23',
|
||||||
|
@ -93,6 +94,12 @@ INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
|
||||||
DATE '2022-09-29'
|
DATE '2022-09-29'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
INSERT INTO Doctorant(idDoctorant, date_debut_these, date_soutenance) VALUES (
|
||||||
|
8,
|
||||||
|
DATE '2022-09-20',
|
||||||
|
DATE '2024-10-12'
|
||||||
|
);
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
-- --
|
-- --
|
||||||
-- Scientifique --
|
-- Scientifique --
|
||||||
|
@ -516,3 +523,8 @@ INSERT INTO Encadrement VALUES (
|
||||||
5
|
5
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO Encadrement VALUES (
|
||||||
|
8,
|
||||||
|
2
|
||||||
|
);
|
||||||
|
|
15
request.sql
15
request.sql
|
@ -6,7 +6,7 @@
|
||||||
--SELECT COUNT(idPublication) as nbCollab FROM Publication
|
--SELECT COUNT(idPublication) as nbCollab FROM Publication
|
||||||
--WHERE classeConf = 'A';
|
--WHERE classeConf = 'A';
|
||||||
|
|
||||||
-- Nathan Q1
|
-- Nathan Q1 tested
|
||||||
SELECT Personnel.nom, Scientifique.grade FROM Personnel, Scientifique
|
SELECT Personnel.nom, Scientifique.grade FROM Personnel, Scientifique
|
||||||
WHERE idPersonnel = idScientifique AND idPersonnel IN (
|
WHERE idPersonnel = idScientifique AND idPersonnel IN (
|
||||||
SELECT idScientifique FROM Encadrement
|
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
|
JOIN Publication pub ON pub.idPublication = pe.idPublication
|
||||||
WHERE pub.classeConf = 'A';
|
WHERE pub.classeConf = 'A';
|
||||||
|
|
||||||
-- Nathan Q5
|
-- Nathan Q5 tested
|
||||||
SELECT idDoctorant, COUNT(idPublication) FROM Publie_Doctorant
|
SELECT idDoctorant, COUNT(idPublication) FROM Publie_Doctorant
|
||||||
GROUP BY idDoctorant;
|
GROUP BY idDoctorant;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ GROUP BY idDoctorant
|
||||||
SELECT COUNT(*) FROM Doctorant
|
SELECT COUNT(*) FROM Doctorant
|
||||||
WHERE date_soutenance IS NOT NULL;
|
WHERE date_soutenance IS NOT NULL;
|
||||||
|
|
||||||
--Nathan Q7
|
--Nathan Q7 tested
|
||||||
SELECT nom, prenom FROM Personnel
|
SELECT nom, prenom FROM Personnel
|
||||||
WHERE idPersonnel IN (
|
WHERE idPersonnel IN (
|
||||||
SELECT idScientifique FROM Scientifique
|
SELECT idScientifique FROM Scientifique
|
||||||
|
@ -75,7 +75,7 @@ NOT IN ( (SELECT idScientifique
|
||||||
FROM Encadrement)
|
FROM Encadrement)
|
||||||
);
|
);
|
||||||
|
|
||||||
-- Nathan Q9
|
-- Nathan Q9 tested
|
||||||
SELECT nom, prenom FROM Personnel
|
SELECT nom, prenom FROM Personnel
|
||||||
WHERE idPersonnel IN (
|
WHERE idPersonnel IN (
|
||||||
SELECT idScientifique FROM Scientifique
|
SELECT idScientifique FROM Scientifique
|
||||||
|
@ -96,6 +96,13 @@ RIGHT JOIN Personnel p ON d.idDoctorant=p.idPersonnel
|
||||||
GROUP BY e.idDoctorant, nom, prenom
|
GROUP BY e.idDoctorant, nom, prenom
|
||||||
HAVING COUNT(DISTINCT s.idScientifique)=1;
|
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
|
-- Axel Q12
|
||||||
SELECT idEnseignant FROM Enseignant_Chercheur ec
|
SELECT idEnseignant FROM Enseignant_Chercheur ec
|
||||||
RIGHT JOIN Publie_Scientifique ps ON ps.idScientifique = ec.idScientifique
|
RIGHT JOIN Publie_Scientifique ps ON ps.idScientifique = ec.idScientifique
|
||||||
|
|
Loading…
Reference in a new issue