Open
Conversation
kelichiu
reviewed
Feb 2, 2025
| with a UNION binding them. */ | ||
|
|
||
|
|
||
| -- omg this was madness... |
kelichiu
reviewed
Feb 2, 2025
kelichiu
left a comment
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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