From 04dc60ac4555624614f06ce0cbaef8a40dcac55e Mon Sep 17 00:00:00 2001
From: John Tokhi <56596400+tokhij@users.noreply.github.com>
Date: Thu, 28 Nov 2019 23:47:31 -0500
Subject: [PATCH] done
---
.idea/.gitignore | 3 +++
.idea/SQL.BuildAndDestroy.iml | 9 +++++++++
.idea/misc.xml | 6 ++++++
.idea/modules.xml | 8 ++++++++
.idea/sqldialects.xml | 6 ++++++
.idea/vcs.xml | 6 ++++++
answers/exercise1.sql | 1 +
answers/exercise10.sql | 2 ++
answers/exercise11.sql | 2 ++
answers/exercise12.sql | 2 ++
answers/exercise13.sql | 2 ++
answers/exercise14.sql | 1 +
answers/exercise15.sql | 1 +
answers/exercise16.sql | 1 +
answers/exercise17.sql | 3 +++
answers/exercise18.sql | 3 +++
answers/exercise19.sql | 1 +
answers/exercise2.sql | 1 +
answers/exercise20.sql | 1 +
answers/exercise3.sql | 7 +++++++
answers/exercise4.sql | 1 +
answers/exercise5.sql | 1 +
answers/exercise6.sql | 1 +
answers/exercise7.sql | 1 +
answers/exercise8.sql | 8 ++++++++
answers/exercise9.sql | 2 ++
26 files changed, 80 insertions(+)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/SQL.BuildAndDestroy.iml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/sqldialects.xml
create mode 100644 .idea/vcs.xml
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..0e40fe8
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+
+# Default ignored files
+/workspace.xml
\ No newline at end of file
diff --git a/.idea/SQL.BuildAndDestroy.iml b/.idea/SQL.BuildAndDestroy.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/SQL.BuildAndDestroy.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..28a804d
--- /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..9bfba77
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml
new file mode 100644
index 0000000..a242c00
--- /dev/null
+++ b/.idea/sqldialects.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ 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..879dc73 100644
--- a/answers/exercise1.sql
+++ b/answers/exercise1.sql
@@ -0,0 +1 @@
+CREATE DATABASE myNewDB;
diff --git a/answers/exercise10.sql b/answers/exercise10.sql
index e69de29..7af0e91 100644
--- a/answers/exercise10.sql
+++ b/answers/exercise10.sql
@@ -0,0 +1,2 @@
+SELECT * FROM Students
+WHERE City='Philadelphia' OR City='Trenton';
\ No newline at end of file
diff --git a/answers/exercise11.sql b/answers/exercise11.sql
index e69de29..e0ca467 100644
--- a/answers/exercise11.sql
+++ b/answers/exercise11.sql
@@ -0,0 +1,2 @@
+SELECT * FROM Students
+ORDER BY City ASC;
\ No newline at end of file
diff --git a/answers/exercise12.sql b/answers/exercise12.sql
index e69de29..7e22273 100644
--- a/answers/exercise12.sql
+++ b/answers/exercise12.sql
@@ -0,0 +1,2 @@
+SELECT * FROM Students
+ORDER BY City DESC;
\ No newline at end of file
diff --git a/answers/exercise13.sql b/answers/exercise13.sql
index e69de29..d065061 100644
--- a/answers/exercise13.sql
+++ b/answers/exercise13.sql
@@ -0,0 +1,2 @@
+SELECT * FROM Students
+ORDER BY Country, City ASC;
\ No newline at end of file
diff --git a/answers/exercise14.sql b/answers/exercise14.sql
index e69de29..e562e34 100644
--- a/answers/exercise14.sql
+++ b/answers/exercise14.sql
@@ -0,0 +1 @@
+SELECT * FROM Students WHERE PostalCode IS NULL;
\ No newline at end of file
diff --git a/answers/exercise15.sql b/answers/exercise15.sql
index e69de29..f0ff0df 100644
--- a/answers/exercise15.sql
+++ b/answers/exercise15.sql
@@ -0,0 +1 @@
+SELECT * FROM Students WHERE PostalCode IS NOT NULL;
\ No newline at end of file
diff --git a/answers/exercise16.sql b/answers/exercise16.sql
index e69de29..af5bf63 100644
--- a/answers/exercise16.sql
+++ b/answers/exercise16.sql
@@ -0,0 +1 @@
+UPDATE Students SET City='Edinburgh';
\ No newline at end of file
diff --git a/answers/exercise17.sql b/answers/exercise17.sql
index e69de29..a7102d5 100644
--- a/answers/exercise17.sql
+++ b/answers/exercise17.sql
@@ -0,0 +1,3 @@
+UPDATE Customers
+SET City='Edinburgh'
+WHERE Country='Scotland';
\ No newline at end of file
diff --git a/answers/exercise18.sql b/answers/exercise18.sql
index e69de29..75db214 100644
--- a/answers/exercise18.sql
+++ b/answers/exercise18.sql
@@ -0,0 +1,3 @@
+UPDATE Students
+SET City= "Edinburgh", Country= "Scotland"
+WHERE ID = 35;
diff --git a/answers/exercise19.sql b/answers/exercise19.sql
index e69de29..950f5c8 100644
--- a/answers/exercise19.sql
+++ b/answers/exercise19.sql
@@ -0,0 +1 @@
+DELETE FROM Students WHERE Country='Scotland';
\ No newline at end of file
diff --git a/answers/exercise2.sql b/answers/exercise2.sql
index e69de29..e7487f3 100644
--- a/answers/exercise2.sql
+++ b/answers/exercise2.sql
@@ -0,0 +1 @@
+DROP DATABASE myNewDB;
\ No newline at end of file
diff --git a/answers/exercise20.sql b/answers/exercise20.sql
index e69de29..5c66fd1 100644
--- a/answers/exercise20.sql
+++ b/answers/exercise20.sql
@@ -0,0 +1 @@
+DELETE FROM Students;
\ No newline at end of file
diff --git a/answers/exercise3.sql b/answers/exercise3.sql
index e69de29..47d0a62 100644
--- a/answers/exercise3.sql
+++ b/answers/exercise3.sql
@@ -0,0 +1,7 @@
+CREATE TABLE Users(
+userId int,
+last_name VARCHAR (255) NOT NULL,
+first_name VARCHAR (255) NOT NULL,
+address VARCHAR (255) NOT NULL,
+city VARCHAR (255) NOT NULL,
+);
\ No newline at end of file
diff --git a/answers/exercise4.sql b/answers/exercise4.sql
index e69de29..e62f6ef 100644
--- a/answers/exercise4.sql
+++ b/answers/exercise4.sql
@@ -0,0 +1 @@
+DROP TABLE Users;
diff --git a/answers/exercise5.sql b/answers/exercise5.sql
index e69de29..0271666 100644
--- a/answers/exercise5.sql
+++ b/answers/exercise5.sql
@@ -0,0 +1 @@
+TRUNCATE TABLE Users;
diff --git a/answers/exercise6.sql b/answers/exercise6.sql
index e69de29..3d1005d 100644
--- a/answers/exercise6.sql
+++ b/answers/exercise6.sql
@@ -0,0 +1 @@
+ADD birthday DATE NOT NULL;
\ No newline at end of file
diff --git a/answers/exercise7.sql b/answers/exercise7.sql
index e69de29..a1d8ebe 100644
--- a/answers/exercise7.sql
+++ b/answers/exercise7.sql
@@ -0,0 +1 @@
+DELETE FROM Users WHERE birthday;
diff --git a/answers/exercise8.sql b/answers/exercise8.sql
index e69de29..58460a6 100644
--- a/answers/exercise8.sql
+++ b/answers/exercise8.sql
@@ -0,0 +1,8 @@
+INSERT INTO Students;
+StudentName,
+Address,
+City,
+PostalCode,
+Country,
+)
+VALUES ('Jane Doe', '57 Union St', 'Glasgow', 'Scotland', 'G13RB');
\ No newline at end of file
diff --git a/answers/exercise9.sql b/answers/exercise9.sql
index e69de29..d3dcd16 100644
--- a/answers/exercise9.sql
+++ b/answers/exercise9.sql
@@ -0,0 +1,2 @@
+SELECT * FROM Students
+WHERE NOT City='Philadelphia';
\ No newline at end of file