Skip to content

Submitting assignment 1 for the SQL module#1

Open
AnnaB29 wants to merge 2 commits intomainfrom
assignment-one
Open

Submitting assignment 1 for the SQL module#1
AnnaB29 wants to merge 2 commits intomainfrom
assignment-one

Conversation

@AnnaB29
Copy link
Owner

@AnnaB29 AnnaB29 commented Jan 25, 2025

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

I added code to complete assignment one.

What did you learn from the changes you have made?

I learned logical models, basic commands (select, from, where), case, join, aggregation, temp tables, datetime functions

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

none

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

none

How were these changes tested?

I tested the code on DB Browser for SQLite.

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

Checklist

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


SELECT *
FROM customer_purchases
WHERE product_id = '4' or product_id = '9';

Choose a reason for hiding this comment

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

Data of product_id is integer, you don't actually need to wrap them with ''.

quantity * cost_to_customer_per_qty AS price
FROM customer_purchases
WHERE vendor_id BETWEEN 8 AND 10;
-- option 2

Choose a reason for hiding this comment

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

We will need to provide another solution using BETWEEN.

Copy link

@kelichiu kelichiu left a comment

Choose a reason for hiding this comment

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

Point: 28/30

Section 1: ✅ Complete

Section 2: ☑️ Partial

WHERE Question 2

In the original file, it's asking you to solve this question using
1. two conditions using AND
2. one condition using BETWEEN

Todo:

You have successfully done 1, please complete 2.

Section 3: ☑️ Partial

Aggregate Question 2

Minor error

Todo:

  • Remove the extra - within the ON clause

Section 4: ✅ Complete

Thank you Anna for the thoughtful reflection, I enjoyed reading it.

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