diff --git a/answers/exercise1.sql b/answers/exercise1.sql index e69de29..c2459b7 100644 --- a/answers/exercise1.sql +++ b/answers/exercise1.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolment LEFT JOIN Students ON Enrolment.StudentID = Students.StudentID; \ No newline at end of file diff --git a/answers/exercise2.sql b/answers/exercise2.sql index e69de29..21af126 100644 --- a/answers/exercise2.sql +++ b/answers/exercise2.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolment RIGHT JOIN Students ON Enrolment.StudentID = Students.StudentID \ No newline at end of file diff --git a/answers/exercise3.sql b/answers/exercise3.sql index e69de29..8a47df7 100644 --- a/answers/exercise3.sql +++ b/answers/exercise3.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolment INNER JOIN Students ON Enrolment.StudentID = Students.StudentID; \ No newline at end of file diff --git a/answers/exercise4.sql b/answers/exercise4.sql index e69de29..c9df488 100644 --- a/answers/exercise4.sql +++ b/answers/exercise4.sql @@ -0,0 +1 @@ +SELECT COUNT(StudentID) FROM Students GROUP BY Country; \ No newline at end of file diff --git a/answers/exercise5.sql b/answers/exercise5.sql index e69de29..c9df488 100644 --- a/answers/exercise5.sql +++ b/answers/exercise5.sql @@ -0,0 +1 @@ +SELECT COUNT(StudentID) FROM Students GROUP BY Country; \ No newline at end of file