-
Notifications
You must be signed in to change notification settings - Fork 33
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
feat(exercises): completed all exercises #44
base: main
Are you sure you want to change the base?
Conversation
All required exercises have been completed and also tested
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 you formatted your queries that helps when you are reading but be more careful with typos and also do no modify unnecessary files.
states s | ||
JOIN | ||
countries c |
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.
When you assign the table's name after FROM or JOIN statement I prefer to use the 3 letters to improve readability in the query. I won't comment the same on the following queries but you should solve it there as well.
|
||
-- 2 | ||
SELECT COUNT(*) AS employees_wothout_bosses |
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.
Fix the typo in wothout
SELECT | ||
c.name AS country_name, | ||
o.address AS address, | ||
COUNT(e.id) AS numer_employees |
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.
Fix the typo in numer
|
||
-- 4 | ||
SELECT | ||
s.id AS supervisor_id, | ||
COUNT(e.id) AS number_of_employe |
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.
Fix the typo in employe
and it should be in plural.
@@ -1,5 +1,1681 @@ | |||
--er-- PostgreSQL database dumpia-- |
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.
We shouldn't modify this file, just the answers.sql
HAVING | ||
s.name = 'Colorado'; |
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.
Here we might use WHERE
clause.
https://www.sql-easy.com/learn/how-to-use-having-clause-in-sql/
All required exercises have been completed and also tested