From 0afe23d438e239c94dd22f169a02504daba7cf94 Mon Sep 17 00:00:00 2001 From: derekchou2 <59002482+derekchou2@users.noreply.github.com> Date: Wed, 17 Feb 2021 18:32:48 -0500 Subject: [PATCH] Add files via upload --- queries.sql | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 queries.sql diff --git a/queries.sql b/queries.sql new file mode 100644 index 0000000..5f4b7ed --- /dev/null +++ b/queries.sql @@ -0,0 +1,33 @@ +USE classicmodels; + +# Part 1 +SELECT productName AS Name, productLine AS Product_Line, buyPrice AS Buy_Price FROM products +ORDER BY Buy_Price DESC; + +# Part 2 +SELECT contactFirstName AS First_Name, contactLastName AS Last_name, city AS City FROM customers +WHERE country = "Germany" +ORDER BY Last_Name; + +# Part 3 +SELECT DISTINCT status FROM orders +ORDER BY status ASC; + +# Part 4 +SELECT * FROM payments +WHERE paymentDate >= '2005-01-01' +ORDER BY paymentDate ASC; + +# Part 5 +SELECT lastName, firstName, email, jobTitle FROM employees +WHERE officeCode = 1 +ORDER BY lastName ASC; + +# Part 6 +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 Product_Line DESC, NAME ASC; + + + +