Skip to content

Uploading assignment one#1

Open
Andyisthebest wants to merge 1 commit intomainfrom
assignment-one
Open

Uploading assignment one#1
Andyisthebest wants to merge 1 commit intomainfrom
assignment-one

Conversation

@Andyisthebest
Copy link
Copy Markdown
Owner

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

Editing both the md. and sql. files, adding a pdf for the section 1 of the assignment.

What did you learn from the changes you have made?

How to write sql codes.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

NA

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

Learning a lot of new codes and debugging.

How were these changes tested?

In the DB - Browser

A reference to a related issue in your repository (if applicable)

NA

Checklist

  • [Y ] I can confirm that my changes are working as intended

@Andyisthebest
Copy link
Copy Markdown
Owner Author

Attempt to upload assignment 1 on March 31

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

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

Very well done. (30/30)

Some observations:
Section 1: In a one-to-many relationship between customer and customer_purchases table, customer.customer_id is the primary key (PK) and customer_purchases.customer_id is the foreign key (FK). You have to put “1” near the customer table and “∞” near the customer_purchases table. It means that one customer can have many purchases. Each purchase belongs to one customer.

c.customer_id,
c.customer_first_name,
c.customer_last_name
HAVING SUM(p.quantity * p.cost_to_customer_per_qty) > 2000
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Calculating again is not required since you have it stored in total_spent .
HAVING total_spent > 2000

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.

2 participants