Skip to content

London 9 - Andriana Saffo - Module-Databases - Week 2 - #34

Closed
AndrianaOS wants to merge 4 commits into
CodeYourFuture:mainfrom
AndrianaOS:main
Closed

London 9 - Andriana Saffo - Module-Databases - Week 2#34
AndrianaOS wants to merge 4 commits into
CodeYourFuture:mainfrom
AndrianaOS:main

Conversation

@AndrianaOS

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

  • Big Spender exercises completed
  • E-commerce exercise completed

Questions

Ask any questions you have for your reviewer.

@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Alexander-Rennie Alexander-Rennie left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Excellent work!

Comment thread .gitignore

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No changes are required to this file for your PR

Comment thread .vscode/settings.json

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No changes are required to this file for your PR

Comment thread Big-Spender/readme.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No changes are required to this file for the Week 2 exercise

Comment thread E-Commerce-API/app.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No changes are required to this file for this PR

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No changes are required to this file for this PR

Comment thread E-Commerce/readme.md
- [ ] List the 5 most expensive products

```sql
SELECT p.id, p.product_name, pa.unit_price FROM products p INNER JOIN product_availability pa ON p.id = pa.prod_id ORDER BY pa.unit_price DESC LIMIT 5;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CORRECT

Comment thread E-Commerce/readme.md
- [ ] List all the products sold by suppliers based in the United Kingdom. The result should only contain the columns product_name and supplier_name

```sql
SELECT p.product_name, s.supplier_name FROM products p INNER JOIN product_availability pa ON p.id = pa.prod_id INNER JOIN suppliers s ON pa.supp_id = s.id WHERE s.country = 'United Kingdom';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CORRECT

Comment thread E-Commerce/readme.md
- [ ] List all orders, including order items, from customer named Hope Crosby

```sql
SELECT o.*, oi.* FROM orders o INNER JOIN order_items oi ON o.id = oi.order_id INNER JOIN customers c ON o.customer_id = c.id WHERE c.name = 'Hope Crosby';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CORRECT

Comment thread E-Commerce/readme.md
- [ ] List all the products in the order ORD006. The result should only contain the columns product_name, unit_price, and quantity

```sql
SELECT p.product_name, pa.unit_price, oi.quantity FROM products p INNER JOIN product_availability pa ON p.id = pa.prod_id INNER JOIN order_items oi ON oi.product_id = pa.prod_id INNER JOIN orders o ON o.id = oi.order_id WHERE o.order_reference = 'ORD006';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CORRECT

Comment thread E-Commerce/readme.md
- [ ] List all the products with their supplier for all orders of all customers. The result should only contain the columns name (from customer), order_reference, order_date, product_name, supplier_name, and quantity

```sql
SELECT c.name, o.order_reference, o.order_date, p.product_name, s.supplier_name, oi.quantity FROM order_items oi INNER JOIN orders o ON oi.order_id = o.id INNER JOIN customers c ON c.id = o.customer_id INNER JOIN product_availability pa ON oi.product_id = pa.prod_id INNER JOIN products p ON p.id = pa.prod_id INNER JOIN suppliers s ON s.id = pa.supp_id;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CORRECT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants