Skip to content

assignment submission#1

Open
hamedabangar wants to merge 3 commits intomainfrom
assignment-one
Open

assignment submission#1
hamedabangar wants to merge 3 commits intomainfrom
assignment-one

Conversation

@hamedabangar
Copy link
Owner

@hamedabangar hamedabangar commented Aug 7, 2025

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

Submitting assignment one, assignment1.sql and the ERD

What did you learn from the changes you have made?

How to create ERD and use relations for existing tables. Also writing some SQL queries for the questions

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

No

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

in creating ERD just adding new fields and items was challenge for me

How were these changes tested?

for SQL queries I ran them in SQLLte and checked the result to see if it covers the questions

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

there is no issue on my repository

Checklist

  • I can confirm that my changes are working as intended

Copy link

@monzchan monzchan left a comment

Choose a reason for hiding this comment

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

Excellent work!

HINT: This query requires you to join two tables, use an aggregate function, and use the HAVING keyword. */
select customer_first_name,customer_last_name, sum(quantity*cost_to_customer_per_qty)
from customer a inner join customer_purchases b on a.customer_id = b.customer_id
group by customer_first_name,customer_last_name

Choose a reason for hiding this comment

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

Consider grouping by customer_id as well as first and last names to uniquely identify customers.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Added and pushed again

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