Skip to content

Conversation

@relaundos7
Copy link
Owner

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

I am adding new SQL queries and refining existing ones to improve data retrieval accuracy and efficiency. Specifically, I added calculated columns, introduced filtering based on specific criteria (e.g., vendor IDs, purchase dates), and implemented JOIN operations to integrate related tables. Additionally, I created new reports summarizing vendor booth rentals and customer spending.

What did you learn from the changes you have made?

I learned how to use SQL aggregate functions like SUM() combined with GROUP BY and HAVING clauses to filter aggregated results. I also gained experience with conditional logic in SQL using CASE statements and how to properly join multiple tables to enrich data queries.

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

I considered using subqueries instead of JOINs for some tasks, such as calculating total customer spending, but opted for JOINs for better readability and performance. Additionally, I thought about creating temporary tables to store intermediate results for complex queries but decided to keep everything in single queries for simplicity.

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

One challenge I dealt with was syntax errors like stray commas in clauses, which I resolved through careful review and testing.

How were these changes tested?

I tested the queries by running them in DB Browser for SQLite, verifying that the outputs matched expected results. For aggregate queries, I cross-checked totals manually and ensured filters returned correct subsets. Additionally, I validated that JOIN operations returned correct combined data from related tables.

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

N/A

Checklist

  • I can confirm that my changes are working as intended

Copy link

@DwardEE DwardEE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Logical model looks clean.

You hit all the rubric checks: WHERE Q2 is correct, the JOIN with proper ordering looks good, the $2K aggregate groups and filters correctly, and the April 2022 totals query is spot on. Temp table creation/insert is clean, and your pepper flag is numeric and case-insensitive. Nicely done!

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.

3 participants