diff --git a/simpleQueriesPart1.sql b/simpleQueriesPart1.sql new file mode 100644 index 0000000..cba9db8 --- /dev/null +++ b/simpleQueriesPart1.sql @@ -0,0 +1,3 @@ +SELECT productName AS 'name', productLine AS 'product line', buyPrice AS 'buy price' +FROM products +ORDER BY buyPrice DESC; diff --git a/simpleQueriesPart2.sql b/simpleQueriesPart2.sql new file mode 100644 index 0000000..7f68807 --- /dev/null +++ b/simpleQueriesPart2.sql @@ -0,0 +1,4 @@ +SELECT contactFirstName AS 'first name', contactLastName AS 'last name', city +FROM customers +WHERE country ='Germany' +ORDER BY contactLastName ASC; \ No newline at end of file diff --git a/simpleQueriesPart3.sql b/simpleQueriesPart3.sql new file mode 100644 index 0000000..e9bbb85 --- /dev/null +++ b/simpleQueriesPart3.sql @@ -0,0 +1,3 @@ +SELECT UNIQUE(status) +FROM orders +ORDER BY status ASC; \ No newline at end of file diff --git a/simpleQueriesPart4.sql b/simpleQueriesPart4.sql new file mode 100644 index 0000000..0ac479c --- /dev/null +++ b/simpleQueriesPart4.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/simpleQueriesPart5.sql b/simpleQueriesPart5.sql new file mode 100644 index 0000000..f8c714b --- /dev/null +++ b/simpleQueriesPart5.sql @@ -0,0 +1,4 @@ +SELECT e.lastName AS 'Last Name', e.firstName AS 'First Name', e.email AS 'Email ', e.jobTitle AS 'Job Title' +FROM employees AS e , offices AS o +WHERE o.city = 'San Francisco' +ORDER BY e.lastName ASC; \ No newline at end of file diff --git a/simpleQueriesPart6.sql b/simpleQueriesPart6.sql new file mode 100644 index 0000000..04350b0 --- /dev/null +++ b/simpleQueriesPart6.sql @@ -0,0 +1,4 @@ +SELECT productName AS 'Name', productLine AS 'Product Line' , productScale AS 'Scale', productVendor AS 'Vendor ' +FROM products +WHERE productLine ='Classic Cars' OR productLine ='Vintage Cars' +ORDER BY productLine DESC, productName ASC; \ No newline at end of file