diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5cd69bd Binary files /dev/null and b/.DS_Store differ diff --git a/answers/exercise1.sql b/answers/exercise1.sql index e69de29..e0c3782 100644 --- a/answers/exercise1.sql +++ b/answers/exercise1.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments LEFT JOIN Students ON Enrolments.id = Students.id; \ No newline at end of file diff --git a/answers/exercise2.sql b/answers/exercise2.sql index e69de29..61f3099 100644 --- a/answers/exercise2.sql +++ b/answers/exercise2.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments INNER JOIN Students ON Enrolments.StudentID = Students.StudentID; \ No newline at end of file diff --git a/answers/exercise3.sql b/answers/exercise3.sql index e69de29..a7baea1 100644 --- a/answers/exercise3.sql +++ b/answers/exercise3.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments RIGHT JOIN Students ON Enrolments.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..905f4d3 100644 --- a/answers/exercise5.sql +++ b/answers/exercise5.sql @@ -0,0 +1 @@ +SELECT COUNT(StudentID) FROM Students GROUP BY Country ORDER BY COUNT(StudentID) ASC; \ No newline at end of file diff --git a/answers/exercise6.sql b/answers/exercise6.sql index e69de29..90bb8ac 100644 --- a/answers/exercise6.sql +++ b/answers/exercise6.sql @@ -0,0 +1 @@ +SELECT COUNT(StudentID) FROM Students GROUP BY Country ORDER BY COUNT(StudentID) >10 ASC; \ No newline at end of file