Open
Conversation
anjali-deshpande-hub
approved these changes
Apr 10, 2026
| ORDER by market_date DESC -- descending order | ||
| ) as customer_visit_number | ||
| FROM ( | ||
| SELECT DISTINCT customer_id |
There was a problem hiding this comment.
DISTINCT not required here.
| p.product_name | ||
| ORDER BY | ||
| v.vendor_name, | ||
| p.product_name; |
There was a problem hiding this comment.
You're very close. The main idea is right. Make a small subquery with one row per vendor_name , product_name and 5 * original_price, then CROSS JOIN that to the customer list, and finally SUM(price) grouped by vendor and product. Currently, it is giving inflated total_sales.
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 don't have much issues with coding. However, submission part is what I always end up having issues with. i.e. or this one,
I accidentally pushed assignment1 files so I had to remove them from assignment-two branch
What did you learn from the changes you have made?
Git has a command for any mistake. However, it does keep track of all of the changes one makes
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I was going to use git reset command but I wasn't confident enough to use it. I feared I would reset the entire repo
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
No matter what I do, I seem to always mess up assignment submission. While I try to follow the steps, I always end up making one. For instance submitting previous assignment files along with the new ones. This did teach me some new shell commands, though.
How were these changes tested?
I just used the commands
A reference to a related issue in your repository (if applicable)
If you look at my pull request, you can clearly see that I deleted 2 files from assignment 1.
Checklist