From 3ed87f5ac78f37370e5091e9450ba21f91c1c312 Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Mon, 21 Feb 2022 11:26:11 -0600 Subject: [PATCH] commiting first excercise --- .gitignore | 1 + non_usa_customers.sql | 2 ++ project_notes.md | 26 ++++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 .gitignore create mode 100644 non_usa_customers.sql create mode 100644 project_notes.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c76d08a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +projectnotes.md* diff --git a/non_usa_customers.sql b/non_usa_customers.sql new file mode 100644 index 0000000..1aaf752 --- /dev/null +++ b/non_usa_customers.sql @@ -0,0 +1,2 @@ +SELECT CustomerId, FirstName, Country FROM CUSTOMER +WHERE COUNTRY != 'USA'; \ No newline at end of file diff --git a/project_notes.md b/project_notes.md new file mode 100644 index 0000000..ddaa6bc --- /dev/null +++ b/project_notes.md @@ -0,0 +1,26 @@ +# Project Notes - SQL Interlude - U + +## Questions +### How to use NOT in queries +Why does + +``` +SELECT * FROM CUSTOMER +WHERE COUNTRY NOT LIKE 'USA'; +``` + +work and + +``` +SELECT * FROM CUSTOMER +WHERE COUNTRY NOT 'USA'; +``` +does not work? + +### Answer +To avoid using like +`WHERE NOT customer.country = "USA";`
+or
+`WHERE NOT != "USA";`
+ +are valid ways of forming the query. \ No newline at end of file