From fe278aad66d073875ad1255a1743d4be63d05b54 Mon Sep 17 00:00:00 2001 From: David Frary Date: Wed, 8 Jul 2020 15:28:47 -0400 Subject: [PATCH 1/3] finished edits on 'customers.sql' --- customers.sql | 4 ++++ employees.sql | 0 offices.sql | 0 orderdetails.sql | 0 orders.sql | 3 +++ payments.sql | 0 productlines.sql | 2 ++ products.sql | 3 +++ 8 files changed, 12 insertions(+) create mode 100644 customers.sql create mode 100644 employees.sql create mode 100644 offices.sql create mode 100644 orderdetails.sql create mode 100644 orders.sql create mode 100644 payments.sql create mode 100644 productlines.sql create mode 100644 products.sql diff --git a/customers.sql b/customers.sql new file mode 100644 index 0000000..46b4bad --- /dev/null +++ b/customers.sql @@ -0,0 +1,4 @@ +SELECT contactFirstName, contactLastName, city; +FROM customers; +WHERE country = 'Germany'; +ORDER BY contactLastName ASC; \ No newline at end of file diff --git a/employees.sql b/employees.sql new file mode 100644 index 0000000..e69de29 diff --git a/offices.sql b/offices.sql new file mode 100644 index 0000000..e69de29 diff --git a/orderdetails.sql b/orderdetails.sql new file mode 100644 index 0000000..e69de29 diff --git a/orders.sql b/orders.sql new file mode 100644 index 0000000..abf19a6 --- /dev/null +++ b/orders.sql @@ -0,0 +1,3 @@ +SELECT * +FROM orders; +ORDER BY orderNumber ASC; \ No newline at end of file diff --git a/payments.sql b/payments.sql new file mode 100644 index 0000000..e69de29 diff --git a/productlines.sql b/productlines.sql new file mode 100644 index 0000000..4ee7f54 --- /dev/null +++ b/productlines.sql @@ -0,0 +1,2 @@ +SELECT textDescription, htmlDescription, image; +FROM productLine diff --git a/products.sql b/products.sql new file mode 100644 index 0000000..1c99039 --- /dev/null +++ b/products.sql @@ -0,0 +1,3 @@ +SELECT productName, productLine, buyPrice; +FROM products; +ORDER BY buyPrice ASC; \ No newline at end of file From 5da78deb126e253021eb8af9ddc77e0894a92add Mon Sep 17 00:00:00 2001 From: David Frary Date: Wed, 8 Jul 2020 15:45:04 -0400 Subject: [PATCH 2/3] finished edits on 'orders.sql' --- orders.sql | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/orders.sql b/orders.sql index abf19a6..47161ad 100644 --- a/orders.sql +++ b/orders.sql @@ -1,3 +1 @@ -SELECT * -FROM orders; -ORDER BY orderNumber ASC; \ No newline at end of file +SELECT * FROM [orders] LIMIT 6; \ No newline at end of file From e781dc9ee144fc80670172bac0da62c49c6c51a2 Mon Sep 17 00:00:00 2001 From: David Frary Date: Wed, 8 Jul 2020 16:12:57 -0400 Subject: [PATCH 3/3] finished edits on 'orders.sql' --- customers.sql | 4 ---- employees.sql | 0 part1-products.sql | 3 +++ part2-customers.sql | 4 ++++ orders.sql => part3-orders.sql | 0 part4-payments.sql | 4 ++++ part5-employees.sql | 4 ++++ part6-productlines.sql | 4 ++++ payments.sql | 0 productlines.sql | 2 -- products.sql | 3 --- 11 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 customers.sql delete mode 100644 employees.sql create mode 100644 part1-products.sql create mode 100644 part2-customers.sql rename orders.sql => part3-orders.sql (100%) create mode 100644 part4-payments.sql create mode 100644 part5-employees.sql create mode 100644 part6-productlines.sql delete mode 100644 payments.sql delete mode 100644 productlines.sql delete mode 100644 products.sql diff --git a/customers.sql b/customers.sql deleted file mode 100644 index 46b4bad..0000000 --- a/customers.sql +++ /dev/null @@ -1,4 +0,0 @@ -SELECT contactFirstName, contactLastName, city; -FROM customers; -WHERE country = 'Germany'; -ORDER BY contactLastName ASC; \ No newline at end of file diff --git a/employees.sql b/employees.sql deleted file mode 100644 index e69de29..0000000 diff --git a/part1-products.sql b/part1-products.sql new file mode 100644 index 0000000..9aca895 --- /dev/null +++ b/part1-products.sql @@ -0,0 +1,3 @@ +SELECT productName AS 'Name', productLine AS 'Product line', buyPrice AS 'Buy Price' +FROM products +ORDER BY buyPrice DESC; \ No newline at end of file diff --git a/part2-customers.sql b/part2-customers.sql new file mode 100644 index 0000000..ef5c0cf --- /dev/null +++ b/part2-customers.sql @@ -0,0 +1,4 @@ +SELECT contactFirstName AS 'First Name', contactLastName AS 'Last Name', city AS 'City' +FROM customers +WHERE country = 'Germany' +ORDER BY contactLastName; \ No newline at end of file diff --git a/orders.sql b/part3-orders.sql similarity index 100% rename from orders.sql rename to part3-orders.sql diff --git a/part4-payments.sql b/part4-payments.sql new file mode 100644 index 0000000..1341316 --- /dev/null +++ b/part4-payments.sql @@ -0,0 +1,4 @@ +SELECT * +FROM payments +WHERE paymentDate > '2005-01-01' +ORDER BY paymentDate ASC; \ No newline at end of file diff --git a/part5-employees.sql b/part5-employees.sql new file mode 100644 index 0000000..16f0fd5 --- /dev/null +++ b/part5-employees.sql @@ -0,0 +1,4 @@ +SELECT lastName, firstName, email, jobTitle +FROM employees, offices +WHERE city = 'San Francisco' +ORDER BY lastName; \ No newline at end of file diff --git a/part6-productlines.sql b/part6-productlines.sql new file mode 100644 index 0000000..4f4e46d --- /dev/null +++ b/part6-productlines.sql @@ -0,0 +1,4 @@ +SELECT productName, productLine, productScale, productVendor +FROM products +WHERE productLine = 'Classic Cars' or productLine = 'Vintage Cars' +ORDER BY productLine DESC, productName ASC; diff --git a/payments.sql b/payments.sql deleted file mode 100644 index e69de29..0000000 diff --git a/productlines.sql b/productlines.sql deleted file mode 100644 index 4ee7f54..0000000 --- a/productlines.sql +++ /dev/null @@ -1,2 +0,0 @@ -SELECT textDescription, htmlDescription, image; -FROM productLine diff --git a/products.sql b/products.sql deleted file mode 100644 index 1c99039..0000000 --- a/products.sql +++ /dev/null @@ -1,3 +0,0 @@ -SELECT productName, productLine, buyPrice; -FROM products; -ORDER BY buyPrice ASC; \ No newline at end of file