forked from UofT-DSI/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Assignment one #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Sdong23
wants to merge
19
commits into
main
Choose a base branch
from
assignment-one
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
06cfffb
assignment1-diagram
Sdong23 fbb2ba8
assignment1
Sdong23 a594258
customer_purchase vs customer
Sdong23 351a690
make two lists and logical diagram
Sdong23 f1f309c
Write a query that returns everything in the customer table. */
Sdong23 4e2ffd7
Write a query that displays all of the columns and 10 rows from the c…
Sdong23 121b16c
Write a query that returns all customer purchases of product IDs 4 an…
Sdong23 b158f86
Write a query that returns all customer purchases and a new calculate…
Sdong23 bd35c73
write a query that outputs the product_id and product_name
Sdong23 8e13285
add a column to the previous query called pepper_flag that outputs a …
Sdong23 c7687d7
inner join
Sdong23 c6d57b9
count
Sdong23 6871742
generate list
Sdong23 918e7b1
make a temp
Sdong23 61d58d0
year and month
Sdong23 c447bca
2022April
Sdong23 6f8150f
ethics
Sdong23 ffa7195
diagram
Sdong23 6dbc772
Merge branch 'assignment-one' of https://github.com/Sdong23/sql into …
Sdong23 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| <mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36" version="26.0.8"> | ||
| <diagram name="Page-1" id="yLB1_hxO5Nf7JVr4UumI"> | ||
| <mxGraphModel dx="954" dy="558" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0"> | ||
| <root> | ||
| <mxCell id="0" /> | ||
| <mxCell id="1" parent="0" /> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-1" value="<b>customer_purchases</b>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> | ||
| <mxGeometry x="110" y="160" width="180" height="208" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-2" value="product_id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="26" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-3" value="vendor_id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="52" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-4" value="market_date" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="78" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-7" value="customer_id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="104" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-6" value="quantity<table><tbody><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td><td><br></td></tr></tbody></table>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="130" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-9" value="cost_to_customer_per_qty<div><br></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="156" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-8" value="transaction_time" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-1"> | ||
| <mxGeometry y="182" width="180" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-11" value="<b>customer</b>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;html=1;" vertex="1" parent="1"> | ||
| <mxGeometry x="425" y="180" width="140" height="130" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-12" value="customer_id" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-11"> | ||
| <mxGeometry y="26" width="140" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-15" value="customer_first_name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-11"> | ||
| <mxGeometry y="52" width="140" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-13" value="customer_last_name" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-11"> | ||
| <mxGeometry y="78" width="140" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-14" value="customer_postal_code" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" vertex="1" parent="ocX54kWvVfms7DKp8SOT-11"> | ||
| <mxGeometry y="104" width="140" height="26" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;endArrow=none;startFill=0;" edge="1" parent="1" source="ocX54kWvVfms7DKp8SOT-7" target="ocX54kWvVfms7DKp8SOT-12"> | ||
| <mxGeometry relative="1" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-18" value="1" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> | ||
| <mxGeometry x="365" y="190" width="60" height="30" as="geometry" /> | ||
| </mxCell> | ||
| <mxCell id="ocX54kWvVfms7DKp8SOT-19" value="<span style="color: rgb(71, 71, 71); font-family: Arial, sans-serif; font-size: 14px; text-align: left; background-color: rgb(255, 255, 255);">∞</span>" style="text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1"> | ||
| <mxGeometry x="290" y="249" width="60" height="30" as="geometry" /> | ||
| </mxCell> | ||
| </root> | ||
| </mxGraphModel> | ||
| </diagram> | ||
| </mxfile> |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using table alias to shorten the query and improve readability.