-
Notifications
You must be signed in to change notification settings - Fork 0
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
databases week1/farzaneh #145
base: main
Are you sure you want to change the base?
Conversation
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.
Hey Farzaneh, nicely done! I checked all the statements and they worked correctly. I left two comments with suggestions, but nothing major that blocks the review. Good job!
I have noticed that my review does not allow you to merge - I have requested access to fix this.
databases/week1/Homework.sql
Outdated
-- Result: 35 | ||
|
||
-- 2. Find out how many tasks in the task table do not have a valid due date | ||
select COUNT(id) from task |
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.
I have noticed inconsistent casing in the different statements: Select
in the first one, select
in the second, SELECT
in the third. Although this is not blocking the review, consider sticking to a particular way of writing code :)
My suggestion is, that you type SQL keywords in uppercase: SELECT COUNT(id) FROM task;
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.
Thanks for the suggestion! I've updated all SQL keywords to uppercase for consistency.
databases/week1/Homework.sql
Outdated
-- 9. Get the name of each status, along with a count of how many tasks have that status | ||
Select status.name as Status_name, count(task.id) AS Status_name_count | ||
From status | ||
LEFT JOIN task on status.id = task.status_id |
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 column status_id
in the table task
cannot be null (this can be checked in the CREATE TABLE
statement here). This means that this LEFT JOIN
is no different from an INNER JOIN
or JOIN
(which is the same as an INNER JOIN
).
This doesn't block the review either, but I suggest that you use LEFT
or RIGHT
joins only when they make a difference from an INNER
, i.e.: when the column you are joining on can be null.
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.
Done!
Hi Jose! Thanks for the feedback, I really appreciate it! ✨ |
Your latest changes look great Farzaneh! Also, the way you have structured the changes in two independent commits with descriptive and accurate messages is very helpful when collaborating with other developers in a professional environment. Very well done there too! I'm still figuring out how to best conduct the reviews in HYF - if there is anything else I can do for you, let me know :) |
No description provided.