Skip to content

Conversation

@fikretellek
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

@sayoiscool sayoiscool left a comment

Choose a reason for hiding this comment

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

Excellent work overall. Well done


```sql
INSERT YOUR QUERY HERE
SELECT * FROM spends WHERE LOWER(description) LIKE '%fee%';

Choose a reason for hiding this comment

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

Good work taking the capitlisations into consideration with 'LOWER'


```sql
INSERT YOUR QUERY HERE
SELECT s.*, e.expense_area FROM spends s JOIN expense_areas e ON s.expense_area_id=e.id WHERE LOWER(e.expense_area) LIKE '%better hospital food%';

Choose a reason for hiding this comment

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

Good use of joins!


```sql
CREATE YOUR QUERY HERE
SELECT DATE_TRUNC('month', date)::DATE AS month, SUM(amount) AS total_amount FROM spends GROUP BY month ORDER BY month;

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 format in your select statement!

INSERT INTO expense_types (expense_type)
SELECT 'Hardware'
WHERE NOT EXISTS (
SELECT 1 FROM expense_types WHERE expense_type = 'Hardware'

Choose a reason for hiding this comment

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

Great attention to detail! The 'Hardware', 'Dell', and 'IT' rows were missing from the other tables, and you've done well by adding the necessary insert statements to populate them.

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