Skip to content

Assignment 2#3

Open
liliywu wants to merge 2 commits intomainfrom
assignment_2
Open

Assignment 2#3
liliywu wants to merge 2 commits intomainfrom
assignment_2

Conversation

@liliywu
Copy link
Copy Markdown
Owner

@liliywu liliywu commented Feb 1, 2025

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

I am trying to make changes to my second assignment

What did you learn from the changes you have made?

I learned that SQL is a complicated ahhaha... need to practice a lot

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

none...

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

my gosh the last query was extremely hard , almost GOD level

How were these changes tested?

they were tested using SQL lite

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

Checklist

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

with a UNION binding them. */


-- omg this was madness...
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

lol, you did it!

Copy link
Copy Markdown

@kelichiu kelichiu left a comment

Choose a reason for hiding this comment

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

Total Point: 60/70

Section 1: 42/46

  • Order Table is actually the orders of new books from suppliers to refill the stock, not customer orders. Having relationship with Sales and Customer is incorrect.
  • For the Date table, it seems like your designed is dedicated to the Order table. This table should be designed in a way that can be used in combination with all tables that have Date values (Orders, Sales, Employee_Shifts).

Section 2: 6/8

  • WINDOW FUNCTION Q1: When use ROW_NUMBER, the data of customer_id and market_date is not unique. We need to use GROUP BY to get the unique combination of customer_id and market_date in data.

Section 3: 4/8

  • DELETE: using product_id instead of product_name as the filter is better, as product_id is the primary key.
  • UPDATE: product_units and vendor_inventory are not joined, so COALESCE(vi.quantity, 0) is not taking effect in product_units. This resulted in products exclusively in product_units having NULLs for current_quantity. NULL values are not handled correctly.

Section 4: 8/8

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