SQL
There is a ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
There is a table (employee), which has a column with an identity of a department (department_id). Select list of departments where the count of employees less than 3.
select department_id from employee group by department_id having count(*) <= 3
select department_id from employee where count(department_id) <= 3
select department_id from employee where max(*) <= 3
Explanation
Get an explanation when it's available:
Subscribe
HAVING-clause
GROUP-BY-clause
SELECT-clause
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
S
QL
Quiz
Login to learn SQL
or
Read more about
SQL Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment