UofT-DSI | SQL - Assignment #2 Section 1, Section 2 and Section 3#2
Open
AmmarMahzan wants to merge 4 commits intomainfrom
Open
UofT-DSI | SQL - Assignment #2 Section 1, Section 2 and Section 3#2AmmarMahzan wants to merge 4 commits intomainfrom
AmmarMahzan wants to merge 4 commits intomainfrom
Conversation
niyazmnazari
left a comment
There was a problem hiding this comment.
Thank you for submitting assignment 2. All queries are correct but you missed section 1.
Point: 20/70
Owner
Author
|
Hi,
I have submitted section 1 together with all the other sections for
assignment 2. Attached is a copy of my submitted assignment 2 for section 1
which already committed in the github.
Thank you.
Ammar
…On Tue, Apr 29, 2025 at 5:12 PM Niyaz Nazari ***@***.***> wrote:
***@***.**** commented on this pull request.
Thank you for submitting assignment 2. All queries are correct but you
missed section 1.
Point: 20/70
—
Reply to this email directly, view it on GitHub
<#2 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BRHPCL2M3UYT2A6NWVZJL63237TMNAVCNFSM6AAAAAB37MQJACVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQMBVGA4TONRYGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Owner
Author
Hi, I’ve updated Section 1 to align with the correct submission format. Previously, I submitted my written response as a PDF (AmmarMahzan_SQL_Assignment#2-Section1.pdf), but I now understand that the response should be written directly in Assignment2.md and supported by ERD diagrams. I’ve now moved the content accordingly and uploaded the required diagrams.
Owner
Author
|
I’ve updated Section 1 to follow the correct format. The written content is now included directly in Assignment2.md, and all ERD diagrams have been uploaded as .png files in the same folder. This completes the Section 1 submission requirements. |
niyazmnazari
approved these changes
Apr 30, 2025
niyazmnazari
left a comment
There was a problem hiding this comment.
Great job! 70/70
You have 4 'Sales' tables in first page and you fixed it in next pages.
Owner
Author
|
Thank you. :) |
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)
What did you learn from the changes you have made?
Learned how to create logical models, manage changing data, and apply advanced SQL concepts like window functions and string manipulation.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
No other major approaches considered.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Faced small challenges handling CROSS JOIN explosion and UPDATE queries, especially referencing correct latest quantities, but managed to solve them.
How were these changes tested?
Tested all queries in DB Browser for SQLite. Execution finished successfully.
Execution finished without errors.
Result: query executed successfully. Took 2ms
At line 227:
-- Update current_quantity from vendor_inventory
UPDATE product_units
SET current_quantity = (
SELECT COALESCE(vi.quantity, 0)
FROM vendor_inventory vi
WHERE vi.product_id = product_units.product_id
ORDER BY vi.market_date DESC
LIMIT 1
)
WHERE EXISTS (
SELECT 1
FROM vendor_inventory vi
WHERE vi.product_id = product_units.product_id
);
A reference to a related issue in your repository (if applicable)
Checklist