-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
NW6 | Pedro Ricciardi | Databases Module | [TECH ED] Big Spender | Sprint 2 #158
base: main
Are you sure you want to change the base?
NW6 | Pedro Ricciardi | Databases Module | [TECH ED] Big Spender | Sprint 2 #158
Conversation
Quality Gate passedIssues Measures |
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.
Overall, great work and good understanding of database queries, however, a little more work to be done with the row insertions
select s.* | ||
from spends s | ||
join expense_areas ea on s.expense_area_id = ea.id | ||
where ea.expense_area ilike 'Better Hospital Food'; | ||
``` |
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.
great job showing alternative queries for this request!
to_char(date_trunc('month', date), 'Month') as month, | ||
sum(amount) as total_amount | ||
from spends | ||
group by month; | ||
``` |
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.
nice work with the date formatting. the date is presented in a clear and easily readable format for the result.
from spends | ||
where | ||
date = '2021-03-01' or | ||
date = '2021-04-01' |
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.
good work. also think of another sql function that would be useful in this case. what sql operator would allow you to specify multiple values in the where clause?
(select id from expense_types | ||
where expense_type ilike 'Hardware'), | ||
(select id from expense_areas | ||
where expense_area ilike 'IT') |
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.
The rows 'hardware', ' dell' and 'IT' don't exist in the other tables, what extra step is needed to populate them where necessary?
Self checklist
Changelist
All queries were written using SQL based on user stories and tested on the local database.
Issue
[TECH ED] Big Spender