NW6 | Pedro Ricciardi | Databases Module | [TECH ED] Big Spender | Sprint 2#158
NW6 | Pedro Ricciardi | Databases Module | [TECH ED] Big Spender | Sprint 2#158PERicci wants to merge 2 commits intoCodeYourFuture:mainfrom
Conversation
|
sayoiscool
left a comment
There was a problem hiding this comment.
Overall, great work and good understanding of database queries, however, a little more work to be done with the row insertions
| 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.
great job showing alternative queries for this request!
| sum(amount) as total_amount | ||
| from spends | ||
| group by month; | ||
| ``` |
There was a problem hiding this comment.
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.
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.
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