diff --git a/Part1.sql b/Part1.sql new file mode 100644 index 0000000..f08202f --- /dev/null +++ b/Part1.sql @@ -0,0 +1,3 @@ +SELECT productName, productLine, 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..b7fa11e --- /dev/null +++ b/Part2.sql @@ -0,0 +1,4 @@ +SELECT contactFirstName, contactLastName, city +FROM customers +WHERE country = 'Germany' +ORDER BY contactLastName ASC diff --git a/Part3.sql b/Part3.sql new file mode 100644 index 0000000..cdab989 --- /dev/null +++ b/Part3.sql @@ -0,0 +1,3 @@ +SELECT DISTINCT status +FROM orders +ORDER BY status ASC diff --git a/Part4.sql b/Part4.sql new file mode 100644 index 0000000..60c2fa5 --- /dev/null +++ b/Part4.sql @@ -0,0 +1,4 @@ +SELECT * +FROM payments +WHERE paymentDate >= '2005-01-01' +ORDER BY paymentDate ASC diff --git a/Part5.sql b/Part5.sql new file mode 100644 index 0000000..b515f1b --- /dev/null +++ b/Part5.sql @@ -0,0 +1,5 @@ +SELECT lastName, firstName, email, jobTitle +FROM employees emps INNER JOIN offices ofs + ON emps.officeCode = ofs.officeCode + WHERE ofs.city = 'San Francisco' +ORDER BY emps.lastName ASC \ No newline at end of file diff --git a/Part6.sql b/Part6.sql new file mode 100644 index 0000000..c3629ee --- /dev/null +++ b/Part6.sql @@ -0,0 +1,5 @@ +SELECT productName, productLine, productScale, productVendor +FROM products +WHERE productLine = 'Classic Cars' OR productLine = 'Vintage Cars' +ORDER BY productLine DESC, productName ASC +