Query | Query in SQL |
A query allowing you to select all the students of a university with their information. | SELECT * FROM Fait_Parcours inner_join Dim_Etudiant ON Fait_Parcours.IdEtudiant=Dim_Etudiant.IdEtudiant INNER JOIN Dim_Filière ON Fait_Parcours.IdFilière=Dim_Filière.IdFilière INNER JOIN Dim_Université ON Fait_Parcours.IdUniversité =Dim_IdUniversité WHERE IdUniversité=1; |
A query that displays the profile of all students in a given course. | SELECT * FROM Fait_Parcours inner_join Dim_Etudiant ON Fait_Parcours.IdEtudiant=Dim_Etudiant.IdEtudiant INNER JOIN Dim_Filière ON Fait_Parcours.IdFilière=Dim_Filière.IdFilière WHERE nomfilière = ‘AGRONOMIE’ |
A query that allows you to display the profile of students with an average score of less than 50 percent in a given field | SELECT * FROM Fait_Parcours inner_join Dim_Etudiant ON Fait_Parcours.IdEtudiant=Dim_Etudiant.IdEtudiant INNER JOIN Dim_Filière ON Fait_Parcours.IdFilière=Dim_Filière.IdFilière WHERE nomfilière = ‘AGRONOMIE’ And note_moyenne<50 |
A query that allows you to have students who have achieved a score in the past and who are performing well in a given sector | SELECT * FROM Fait_Parcours inner_join Dim_Etudiant ON Fait_Parcours.IdEtudiant=Dim_Etudiant.IdEtudiant INNER JOIN Dim_Filière ON Fait_Parcours.IdFilière=Dim_Filière.IdFilière WHERE nomfilière = ‘MEDECINE’ And sec_Bac=‘SCIENTIFIQUE’ AND pour_BAC>=60 |
A request allowing you to have the profile of students who had a goal and who chose a given sector | SELECT * FROM Fait_Parcours inner_join Dim_Etudiant ON Fait_Parcours.IdEtudiant=Dim_Etudiant.IdEtudiant INNER JOIN Dim_Filière ON Fait_Parcours.IdFilière=Dim_Filière.IdFilière INNER JOIN Dim_Obj_Prof ON Fait_Parcours.IdObjprof=Dim_Obj_Prof.Idobjprof WHERE nomfilière = ‘MEDECINE’ And sec_Bac=‘SCIENTIFIQUE’ AND pour_BAC>=60 |