Skip to content

Assignment two#2

Open
suha1200 wants to merge 3 commits intomainfrom
assignment-two
Open

Assignment two#2
suha1200 wants to merge 3 commits intomainfrom
assignment-two

Conversation

@suha1200
Copy link
Copy Markdown
Owner

@suha1200 suha1200 commented Aug 16, 2025

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

I created SQL scripts for selct, inserting, updating, and deleting records safely, and added logic for tracking product quantities.

What did you learn from the changes you have made?

I learned how to use COALESCE to handle NULL values, ensure safe INSERT/DELETE operations, and apply subqueries inside UPDATE and SELECT statements.

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

Yes, I considered using joins for the update and finding the latest quentity instead of correlated subqueries, but chose the subquery for simplicity.

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

How were these changes tested?

I ran queries on sample data, verified the product_units table after each step, and confirmed correct values (nulls replaced with zeros, latest quantities updated)

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

Checklist

  • I can confirm that my changes are working as intended

Submit two pdfs for the prompt-1 Logical model and prompt-2 Logical Model
submit Assignment2.md
Copy link
Copy Markdown

@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!!

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