Skip to content

Assignment two#2

Open
akavalek wants to merge 3 commits intomainfrom
assignment-two
Open

Assignment two#2
akavalek wants to merge 3 commits intomainfrom
assignment-two

Conversation

@akavalek
Copy link
Copy Markdown
Owner

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

Trying to submit SQL assignment 2 for the first time!

What did you learn from the changes you have made?

There are diferent ways use CTEs vs temp tables - while I understand temp tables better, CTEs seem to be much more efficient

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

For the best and worst day seling question - I tried to use a CTE but I kept getting errors - so I went with the temp table option.

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

Best and worst day selling question was though. The delete row and the update table question at the end took a lot of time and trial and errror.

How were these changes tested?

Ran the queries in SQL

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

Checklist

  • I can confirm that my changes are working as intended

Copy link
Copy Markdown

@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.

Good job on your answer. There are no issues with your diagram,

For your DELETE subquery, it uses MIN(snapshot_timestamp) across the whole table, not scoped to the same product.

Ultimately, no major issues with the assignment.

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