diff --git a/Part1.sql b/Part1.sql new file mode 100644 index 0000000..70a318e --- /dev/null +++ b/Part1.sql @@ -0,0 +1,6 @@ +SELECT productName,productLine,buyPrice FROM products; + +SELECT productName AS NAME, productLine AS ProductLine, buyPrice AS BuyPrice FROM products; + +SELECT productName AS NAME, productLine AS ProductLine, buyPrice AS BuyPrice FROM products +ORDER BY buyPrice desc; \ No newline at end of file diff --git a/Part2.sql b/Part2.sql new file mode 100644 index 0000000..e97e721 --- /dev/null +++ b/Part2.sql @@ -0,0 +1,8 @@ +SELECT contactFirstName, contactLastName,city FROM customers +WHERE country='Germany'; + +SELECT contactFirstName AS 'First Name', contactLastName AS 'Last Name',city AS City FROM customers +WHERE country='Germany'; + +SELECT contactFirstName AS 'First Name', contactLastName AS 'Last Name',city AS City FROM customers +WHERE country='Germany' ORDER BY contactLastName ASC; \ No newline at end of file diff --git a/Part3.sql b/Part3.sql new file mode 100644 index 0000000..a77a411 --- /dev/null +++ b/Part3.sql @@ -0,0 +1,6 @@ +SELECT * FROM orders; + +SELECT DISTINCT status FROM orders; + +SELECT DISTINCT status FROM orders +ORDER BY status asc; \ No newline at end of file diff --git a/Part4.sql b/Part4.sql new file mode 100644 index 0000000..b88365b --- /dev/null +++ b/Part4.sql @@ -0,0 +1,6 @@ +SELECT * FROM payments; + +SELECT * FROM payments WHERE paymentDate >= '2005-1-1'; + +SELECT * FROM payments WHERE paymentDate >= '2005-1-1' +ORDER BY paymentDate; \ No newline at end of file diff --git a/Part5.sql b/Part5.sql new file mode 100644 index 0000000..62af9c3 --- /dev/null +++ b/Part5.sql @@ -0,0 +1,8 @@ +SELECT * FROM employees; + +SELECT lastName,firstName,email,jobTitle FROM employees +WHERE Not officeCode=1; + +SELECT lastName,firstName,email,jobTitle FROM employees +WHERE Not officeCode=1 +ORDER BY lastName asc; \ No newline at end of file diff --git a/Part6.sql b/Part6.sql new file mode 100644 index 0000000..58f53c0 --- /dev/null +++ b/Part6.sql @@ -0,0 +1,8 @@ +SELECT * FROM products; + +SELECT productName, productLine, productScale,productVendor FROM products +WHERE productLine='Classic Cars' OR productLine='Vintage Cars'; + +SELECT productName, productLine, productScale,productVendor FROM products +WHERE productLine='Classic Cars' OR productLine='Vintage Cars' +ORDER BY productLine DESC, productName asc; \ No newline at end of file