Conversation
anjali-deshpande-hub
left a comment
There was a problem hiding this comment.
Looks good overall. 29/30
Section 3: Question 2: ORDER BY c.customer_last_name, c.customer_first_name is to be added for sorting by last name, then first name.
Another observation, this PR has eight file changes. In future, only add the files that are required. Also, try to add comments to the PR. Thank you.
bookstore logic model
There was a problem hiding this comment.
Section 1 and 4 has been reviewed and looks ok.
Section 1:
Windowed functions: Question 3: Count() - market_date is not included in the GROUP BY. Correct answer:
SELECT cp.*,
COUNT(product_id) OVER (PARTITION BY customer_id, product_id) AS
product_purchase_count
FROM customer_purchases AS cp
ORDER BY customer_id, product_id, market_date
Section 2: Union - Please check the SQL command? Its giving me errors.
Section 3: Delete - The requirement is to delete the older record for the product added.
You can use MIN(snapshot_timestamp) function. Using the WITH clause and MIN function, identify the earliest snapshot for the product_id and then delete the row that matches that product_id and timestamp.
Section 3: Update - Please check the SQL commands. Its giving me errors.
If you would like to fix above listed problems, please make the necessary changes and re-submit. I can re-review the changes. Thank you.
added ; to code. hopefully this solves the errors!
anjali-deshpande-hub
left a comment
There was a problem hiding this comment.
65/70
Review 2 -
Reviewed section 2, 3 (Assignment2.sql file):
Section 2: Question 3 is still giving me incorrect result set.
Section 2: Union Query is fixed correctly
Section 3: Delete and Update: Incorrect.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
What did you learn from the changes you have made?
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
How were these changes tested?
A reference to a related issue in your repository (if applicable)
Checklist