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 nulls. 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"