Skip to content

Complete SQL Assignment 2#2

Open
YuouSheng wants to merge 1 commit intomainfrom
assignment-two
Open

Complete SQL Assignment 2#2
YuouSheng wants to merge 1 commit intomainfrom
assignment-two

Conversation

@YuouSheng
Copy link
Copy Markdown
Owner

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

Added SQL queries, ERD diagrams, and Markdown documentation for Assignment 2.

What did you learn from the changes you have made?

I learned how to design logical data models, extend ERDs with new entities and relationships, and apply SQL commands such as JOINs, INSERT, UPDATE, DELETE, and window functions.

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

I considered storing shift info directly in EMPLOYEE but created a separate EMPLOYEE_SHIFT_ASSIGNMENT table to maintain normalization and flexibility.

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

Yes, structuring the UPDATE query with a CTE and COALESCE required several iterations to fix syntax errors. Testing queries in DB Browser helped verify the logic.

How were these changes tested?

I executed all SQL queries in DB Browser and confirmed no errors. Both ERD diagrams were created and validated in draw.io.

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

Checklist

  • I can confirm that my changes are working as intended

SELECT
b.vendor_name,
b.product_name,
5 * n.n * b.price_per_qty AS hypothetical_revenue
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Number 5 is abstract number

@khsergvl
Copy link
Copy Markdown

Thank you for submitting assignment 2.
Mark: 70/70

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