Unique Results For SQL Command With GROUP, MIN And NULL Values
I have a table inquiry with columns job, gender (TRUE for women, FALSE for men) and salary. None of the columns is unique, salary may contain NULL. How to find the minimum salary p
Solution 1:
Aggregate functions ignore null
s. Lose the join and you should be OK:
SELECT job, MIN(salary)
FROM inquiry
WHERE gender = 1
GROUP BY job
Post a Comment for "Unique Results For SQL Command With GROUP, MIN And NULL Values"