Skip to content

Assignment two#2

Open
Fermisk64 wants to merge 4 commits intomainfrom
assignment-two
Open

Assignment two#2
Fermisk64 wants to merge 4 commits intomainfrom
assignment-two

Conversation

@Fermisk64
Copy link
Copy Markdown
Owner

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

  • I can confirm that my changes are working as intended

Copy link
Copy Markdown

@anjali-deshpande-hub anjali-deshpande-hub left a comment

Choose a reason for hiding this comment

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

Very well done! 70/70

ORDER by market_date DESC -- descending order
) as customer_visit_number
FROM (
SELECT DISTINCT customer_id
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

DISTINCT not required here.

p.product_name
ORDER BY
v.vendor_name,
p.product_name;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

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