Skip to content
This repository was archived by the owner on Aug 17, 2024. It is now read-only.

Conversation

Doris-Siu
Copy link

Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in HOW_TO_MARK.md in the root of this repository

Your Details

  • Your Name:
  • Your City:
  • Your Slack Name:

Homework Details

  • Module:
  • Week:

Notes

  • What did you find easy?

  • What did you find hard?

  • What do you still not understand?

  • Any other notes?

@@ -0,0 +1 @@
node_modules
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you remembered to add node_modules to your .gitignore file, good job

```sql
1. select name, address from customers where country = 'United States';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using uppercase for your SQL commands can make it easier to read :)

```sql
1. select name, address from customers where country = 'United States';
2. select * from customers order by name;
3. select * from products where product_name ilike 'socks%' or product_name ilike '%socks' or product_name ilike '%socks%';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can just use %socks% here

5. select * from product_availability order by unit_price desc limit 5;
6. select p.product_name, pa.unit_price, s.supplier_name from products p join product_availability pa on (p.id=pa.prod_id) join suppliers s on (s.id=pa.supp_id);
7. select p.product_name, s.supplier_name from products p join product_availability pa on (p.id=pa.prod_id) join suppliers s on (s.id=pa.supp_id) where s.country = 'United Kingdom';
8. select oi.order_id, o.order_reference, o.order_date, (oi.quantity * pa.unit_price) as total_cost
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how you're using AS total_cost here

on (pa.prod_id = p.id)
where o.order_reference = 'ORD006';
11. select c.name, o.order_date, o.order_reference, p.product_name, s.supplier_name, oi.quantity
from customers c
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

splitting your clauses over new lines make it easier to follow, nice job :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants