Skip to content

Assignment-one SQL Stephanie Shishis#1

Open
StephanieShishis wants to merge 4 commits into
mainfrom
assignment-one
Open

Assignment-one SQL Stephanie Shishis#1
StephanieShishis wants to merge 4 commits into
mainfrom
assignment-one

Conversation

@StephanieShishis

Copy link
Copy Markdown
Owner

UofT-DSI | SQL - Assignment 1

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

The changes I had to make in this assignment was learning how to write SQL queries using SQL concepts like SELECT, WHERE, CASE, JOIN, AGGREGATE and TEMP TABLES.

What did you learn from the changes you have made?

The biggest thing I learned was that CASE expressions have to go inside the SELECT function, not after FROM. Also, GROUP BY is required when using aggregate functions (SUM/COUNT).

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

In Query 3, I originally used BETWEEN 4 AND 9 assuming it would filter for IDs 4 and 9 only but learned BETWEEN is inclusive of all the values in this range. I used product_id = 4 OR product_id = 9 instead.

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

I think the biggest challenge was just understanding the order of how queries were organized. Going from python to SQL it is a little bit of an adjustment but when the system would throw an error I would refer back to my notes and try again.

How were these changes tested?

I ran all of my queries in the DB Browser against the farmers market database and ensured the output ran without any errors. I would double check the output in the execute SQL window and confirm if it matched what the question was asking.

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

N/A

Checklist

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

@StephanieShishis

Copy link
Copy Markdown
Owner Author

NOTE : [Merge branch 'main' into assignment-one] - updated the live code on my main branch to also be reflected in the assignment branch as I made the assignment branches before the live code and only updated my main branch

@khsergvl

khsergvl commented Apr 2, 2026

Copy link
Copy Markdown

Great work!

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