UofT-DSI | SQL Module – Assignment 2 (Sections 1–3)#2
Merged
Conversation
niyazmnazari
approved these changes
May 2, 2025
niyazmnazari
left a comment
There was a problem hiding this comment.
Thank you for submitting assignment 2. You didn't submit section1-propmpt3, section2, and section3.
Point: 40/70
Owner
Author
|
@niyazmnazari thank you for your PR! Working on the complete assignment EoW. |
niyazmnazari
approved these changes
May 5, 2025
niyazmnazari
left a comment
There was a problem hiding this comment.
Good job, thank you. I did not find the answer of prompt 3 of section 1.
60/70
Owner
Author
|
@niyazmnazari Are you referring this section? |
val-poon
commented
May 6, 2025
Owner
Author
val-poon
left a comment
There was a problem hiding this comment.
✅ Section 3 now includes queries to calculate the number of vendor-product combinations (x) and customers (y), as outlined in the rubric.
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)
This pull request submits the completed work for Assignment 2 of the SQL module. It includes:
COALESCE,ROW_NUMBER,DENSE_RANK,COUNT,SUBSTR,INSTR, andUNIONCROSS JOIN,INSERT,DELETE, andUPDATEoperations using temporary and permanent tablesassignment2.sqlfarmersmarket.db(for Section 3)What did you learn from the changes you have made?
INSERT,DELETE, andUPDATECOALESCEto handle NULLs and maintain clean outputsWas there another approach you were thinking about making? If so, what approach(es) were you thinking of?
For updating
current_quantityin Section 3, I explored usingRANK()but chose to filter byORDER BY market_date DESC LIMIT 1for simplicity and clarity.Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
original_priceas vendor cost instead of a historical price — corrected this after re-reading the schema and verifying use casesCOALESCEand a filteredUPDATEwithEXISTSproduct_unitstable after realizing temporary tables aren’t saved in DB BrowserHow were these changes tested?
.dbchanges and committed them using GitA reference to a related issue in your repository (if applicable)
N/A
✅ Checklist
assignment-twobranch