What I'm trying to achieve is this:
1) Get the minimum value of a salary in the table for every department.
2) If this minimum value exists in the table at least two times for every department, then show its department id.
Example:
column1 name salary department_id
id1 John1 10000 1
id2 John2 10000 1
id3 John3 30000 2
id4 John4 30000 2
id5 John5 50000 3
id6 John6 20000 4
Result:
department_id
1
2