sql - SELECT maximum and minimum value from a table -


i trying fname , lname of person makes money , person makes least.

i looking solution uses 1 query

select fname, lname employees salary =51,000 , salary =$28,000; 

i tried figure out not.

it using subqueries , having hard time figuring out. said use 1 query.

select fname, lname, salary employees salary = (select min(salary) employees) or      salary = (select max(salary) employees) 

edit: if know values of top/bottom salary, use this:

select fname, lname employees salary =51,000 or salary =$28,000; 

emphasis on or.


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -