Open
Conversation
kelichiu
reviewed
Jan 27, 2025
|
|
||
| SELECT product_id, vendor_id, market_date, customer_id, quantity, cost_to_customer_per_qty, transaction_time -- explicit | ||
| , quantity * cost_to_customer_per_qty AS price | ||
| FROM customer_purchases; |
There was a problem hiding this comment.
Remove ;, the query is not ending here.
kelichiu
reviewed
Jan 27, 2025
|
|
||
| -- SELECT * -- NO explicit | ||
| SELECT product_id, vendor_id, market_date, customer_id, quantity, cost_to_customer_per_qty, transaction_time /* explicit */ | ||
| FROM customer_purchases; |
kelichiu
reviewed
Jan 27, 2025
|
|
||
|
|
||
| SELECT product_id, vendor_id, market_date, customer_id, quantity, cost_to_customer_per_qty, transaction_time -- explicit | ||
| FROM customer_purchases; |
kelichiu
reviewed
Jan 27, 2025
|
|
||
| -- SELECT * -- NO explicit | ||
| SELECT customer_id, customer_first_name, customer_last_name, customer_postal_code /* explicit */ | ||
| FROM customer; |
kelichiu
reviewed
Jan 27, 2025
| vendor_id field they both have in common, and sorts the result by vendor_name, then market_date. */ | ||
|
|
||
|
|
||
| SELECT v.*, vc.* -- NO EXPLICIT |
There was a problem hiding this comment.
Using single * will return all columns in both tables as well.
kelichiu
reviewed
Jan 27, 2025
|
|
||
|
|
||
| SELECT v.*, vc.* -- NO EXPLICIT | ||
| FROM vendor AS v; |
kelichiu
reviewed
Jan 27, 2025
| SELECT cp.customer_id, c.customer_first_name, c.customer_last_name | ||
| , sum(cp.quantity*cp.cost_to_customer_per_qty) AS total_purchases | ||
|
|
||
| FROM customer_purchases AS cp; |
kelichiu
suggested changes
Jan 27, 2025
kelichiu
left a comment
There was a problem hiding this comment.
Point: 27/30
Section 1: ✅ Complete
Section 2: ☑️ Partial
Where Question 2 and other questions
Todo:
;signifies the end of a query. Please remove extra;in your queries to prevent errors.
Section 3: ☑️ Partial
Aggregate Question 2
Todo:
;signifies the end of a query. Please remove extra;in your queries to prevent errors.
Section 4: ✅ Complete
Hi Mauricio, thank you for your thoughtful reflection, I enjoyed reading it.
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)
Complete assignment 1 for the SQL module.
What did you learn from the changes you have made?
How to write queries using SQlite and how to interpret relational databases.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I would like to learn how to manipulate the tables more similar or comparable with pandas so I can remember more easily the structures.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
I have to search the web for the documentation and how to do things such as modify tables.
How were these changes tested?
I run the code using DB Browser for SQLlite
A reference to a related issue in your repository (if applicable)
N/A
Checklist