diff --git a/answers/exercise1.sql b/answers/exercise1.sql index e69de29..15b767a 100644 --- a/answers/exercise1.sql +++ b/answers/exercise1.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments e LEFT JOIN Students s ON e.StudentID = s.StudentID; \ No newline at end of file diff --git a/answers/exercise2.sql b/answers/exercise2.sql index e69de29..35cf8f6 100644 --- a/answers/exercise2.sql +++ b/answers/exercise2.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments e INNER JOIN Students s ON e.StudentID = s.StudentID; \ No newline at end of file diff --git a/answers/exercise3.sql b/answers/exercise3.sql index e69de29..d598220 100644 --- a/answers/exercise3.sql +++ b/answers/exercise3.sql @@ -0,0 +1 @@ +SELECT * From Enrolments e RIGHT JOIN Students s ON e.StudentID = s.StudentID; \ No newline at end of file diff --git a/answers/exercise4.sql b/answers/exercise4.sql index e69de29..25e1c15 100644 --- a/answers/exercise4.sql +++ b/answers/exercise4.sql @@ -0,0 +1 @@ +SELECT COUNT(Country) FROM Students GROUP BY Country; \ No newline at end of file diff --git a/answers/exercise5.sql b/answers/exercise5.sql index e69de29..14fea69 100644 --- a/answers/exercise5.sql +++ b/answers/exercise5.sql @@ -0,0 +1 @@ +SELECT COUNT(Country) FROM Students GROUP BY Country ORDER BY COUNT(Country) DESC; \ No newline at end of file diff --git a/answers/exercise6.sql b/answers/exercise6.sql index e69de29..86ca4a3 100644 --- a/answers/exercise6.sql +++ b/answers/exercise6.sql @@ -0,0 +1 @@ +SELECT COUNT(Country) FROM Students GROUP BY Country HAVING COUNT(Country) > 10 ORDER BY COUNT(Country) DESC; \ No newline at end of file