SQL
Given an < ...
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
Given an
employee
table with
id, chef_id, salary
fields - how to select all employees whose salary is greater than that of their chief?
select a.* from employee a, employee b where b.id = a.chief_id and a.salary > b.salary
select a.* from employee a, employee b where b.id = a.chief_id and a.salary >= b.salary
Explanation
Get an explanation when it's available:
Subscribe
join
WHERE-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