diff --git a/Part1.sql b/Part1.sql new file mode 100644 index 0000000..6fac8ad --- /dev/null +++ b/Part1.sql @@ -0,0 +1,4 @@ +SELECT customers.customerName, employees.lastName, employees.firstName +FROM customers +INNER JOIN employees ON customers.salesRepEmployeeNumber=employees.employeeNumber +ORDER BY customerName ASC; \ No newline at end of file diff --git a/Part2.sql b/Part2.sql new file mode 100644 index 0000000..d849ff4 --- /dev/null +++ b/Part2.sql @@ -0,0 +1,3 @@ +SELECT productName AS 'Product Name',(quantityOrdered * priceEach) AS 'Total sale', quantityOrdered as 'Total # Ordered' +FROM products JOIN orderdetails ON products.productcode=orderdetails.productcode +ORDER BY (quantityOrdered * priceEach) DESC; \ No newline at end of file