Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Day1 Simple Queries/part1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT productName, productLine, buyPrice FROM products;
1 change: 1 addition & 0 deletions Day1 Simple Queries/part2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT contactFirstName, contactLastName, city From customers WHERE(country = 'Germany');
1 change: 1 addition & 0 deletions Day1 Simple Queries/part3.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT DISTINCT status FROM orders;
3 changes: 3 additions & 0 deletions Day1 Simple Queries/part4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*Select all fields from the payments table for payments made on or after January 1, 2005.*/
SELECT * FROM payments WHERE paymentDate BETWEEN '2005-01-01' AND '2020-07-08'
ORDER BY paymentDate ASC;
3 changes: 3 additions & 0 deletions Day1 Simple Queries/part5.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/*Write a query to display all Last Name, First Name, Email and Job Title of all employees working out
of the San Francisco office.*/
SELECT * FROM employees WHERE officeCode =1 ORDER BY lastName;
4 changes: 4 additions & 0 deletions Day1 Simple Queries/part6.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/*Write a query to display the Name, Product Line, Scale, and Vendor of all of the car products –
both classic and vintage. The output should display all vintage cars first (sorted alphabetically by name),
and all classic cars last (also sorted alphabetically by name).*/
SELECT * FROM products WHERE productLine IN ('Classic Cars', 'Vintage Cars') order by productLine DESC;