Open
Conversation
DwardEE
approved these changes
Aug 13, 2025
DwardEE
left a comment
There was a problem hiding this comment.
Good Job!
Your logic model looks good.
There are some issues with your code. WHERE Q1 is not correct because you split product 4 and product 9 into two separate queries instead of a single query with both values. AGGREGATE Q2 is logically correct, but you’re grouping by names instead of customer_id. This usually works, but grouping by customer_id is safer in case names repeat. DATE Q2 is correct.
These fixes are quite minor, so I'll consider the assignment as complete
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)
I have completed all required queries in assignment1.sql for the farmersmarket.db dataset and added a logical model diagram showing the customer and customer_purchases tables with their relationships. This includes solutions for WHERE, JOIN, AGGREGATE, and DATE section prompts.
What did you learn from the changes you have made?
I learned how to use SQLite functions such as strftime for date extraction, CASE statements for conditional columns, and HAVING with aggregate functions. I also reinforced my understanding of one-to-many relationships in a database and how to represent them in a logical model.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
There are many ways to write the same query, but this seemed the easiest way to do it.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
I had to adjust my logic in some of the queries, also since the date section was not requeried but I wanted to do it, I had to brush up the strftime concept.
How were these changes tested?
Each query was run directly against farmersmarket.db in the SQLite CLI to verify that the output matched the assignment requirements. I also ran the full assignment1.sql file to confirm there were no syntax errors and that all queries executed correctly.
A reference to a related issue in your repository (if applicable)
None
Checklist
I can confirm that my changes are working as intended YES
I have verified that all queries return the correct results YES
I have included the logical model diagram in this branch YES