From 2a99ef5e70ae29648b1ead65f1acc7d39ad82f41 Mon Sep 17 00:00:00 2001 From: Jared Date: Wed, 7 Aug 2024 17:17:08 -0400 Subject: [PATCH 1/2] workinonit --- .idea/.gitignore | 8 ++++++++ .idea/SQL.LetsGetTogether.iml | 9 +++++++++ .idea/dataSources.xml | 18 ++++++++++++++++++ .idea/misc.xml | 6 ++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ answers/exercise1.sql | 1 + answers/exercise2.sql | 1 + answers/exercise3.sql | 1 + 9 files changed, 58 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/SQL.LetsGetTogether.iml create mode 100644 .idea/dataSources.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/SQL.LetsGetTogether.iml b/.idea/SQL.LetsGetTogether.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/SQL.LetsGetTogether.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 0000000..48497df --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,18 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306 + + + + + + + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4444b22 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a731dc1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/answers/exercise1.sql b/answers/exercise1.sql index e69de29..7159fb4 100644 --- a/answers/exercise1.sql +++ b/answers/exercise1.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments as E LEFT JOIN Students as S ON E.StudentID = S.StudentID; \ No newline at end of file diff --git a/answers/exercise2.sql b/answers/exercise2.sql index e69de29..ec8a9cb 100644 --- a/answers/exercise2.sql +++ b/answers/exercise2.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments as E INNER JOIN Students as S ON E.StudentID = S.StudentID; \ No newline at end of file diff --git a/answers/exercise3.sql b/answers/exercise3.sql index e69de29..309f624 100644 --- a/answers/exercise3.sql +++ b/answers/exercise3.sql @@ -0,0 +1 @@ +SELECT * FROM Enrolments as E RIGHT JOIN Students as S ON E.StudentID = S.StudentID; \ No newline at end of file From f2cd23e2ab0d1bdd8d814331b5ef26e97e4e0697 Mon Sep 17 00:00:00 2001 From: Jared Date: Wed, 7 Aug 2024 17:32:14 -0400 Subject: [PATCH 2/2] dunnit --- answers/exercise4.sql | 1 + answers/exercise5.sql | 1 + answers/exercise6.sql | 1 + 3 files changed, 3 insertions(+) diff --git a/answers/exercise4.sql b/answers/exercise4.sql index e69de29..37e8365 100644 --- a/answers/exercise4.sql +++ b/answers/exercise4.sql @@ -0,0 +1 @@ +SELECT count(*) FROM Students GROUP BY Country; \ No newline at end of file diff --git a/answers/exercise5.sql b/answers/exercise5.sql index e69de29..795f78e 100644 --- a/answers/exercise5.sql +++ b/answers/exercise5.sql @@ -0,0 +1 @@ +SELECT count(*) FROM Students GROUP BY Country ORDER BY COUNT(Students) DESC; \ No newline at end of file diff --git a/answers/exercise6.sql b/answers/exercise6.sql index e69de29..ce703d2 100644 --- a/answers/exercise6.sql +++ b/answers/exercise6.sql @@ -0,0 +1 @@ +SELECT count(*) FROM Students where Students > 10 GROUP BY Country ORDER BY COUNT(Students) DESC; \ No newline at end of file