Skip to content

Conversation

@cvasoff
Copy link
Owner

@cvasoff cvasoff commented Nov 13, 2025

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

a) I attempted to design a preliminary logical data model for a fictional bookshop in three stages by addressing Question 1 prompts. I provided a short explanation for modelling a Type 1 or Type 2 architecture for a customer table (which included customers' addresses). b) I wrote SQL code for query questions in Questions 2 and 3. c) For Question 4, I read and responded to the Boykis article.

What did you learn from the changes you have made?

Querying in SQL can quickly become very complicated, and it takes a lot of practice (i.e., trial and error) to write successful queries. Also, building with a skeleton —for example, anchoring between SELECT and FROM commands, running subqueries and inserting them —while referring to example code is essential for me to puzzle through the query request/question.

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

I'm not sure whether I've answered the final SQL query correctly, and I'm sure there's more than one way to do it. I wanted to consider incorporating NULL value substitution with a zero value in the first subquery.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it? I had a lot of challenges! I learned that breaking the questions down into logical, manageable sections and documenting, in my own words, what I needed to do next helped me complete them. I've included my thoughts and references as comments in my code to support my work.

How were these changes tested?

I checked and rechecked whether my code produced the required query tables, based on my understanding of the question.

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

Checklist

  • [ x] I can confirm that my changes are working as intended

Copy link

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

Well done (66/70)

Section 3: Delete: You also have to also code for older record. You can use MIN(snapshot_timestamp) function. Using the WITH clause and MIN function, identify the earliest snapshot for the product_id and then delete the row that matches that product_id and timestamp.

Section 3: Update: The code has syntax errors.

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