I have a database in SQLServer in which there are multiple rows for a database named emp_details. The table contains several fields, one of which is salary. The salary is not unique for the employees, and I need to fetch one complete row for each unique salary value.
Kindly let me know the query which may help.
A sample of the database:
a b c d e f
17 IL11 53 IL11 48 58
26 IL10 53 IL10 48 58
31 IL15 53 IL15 48 58
32 IL16 53 IL16 24 58
33 IL17 53 IL17 36 58
34 IL18 53 IL18 36 58
37 IL21 53 IL21 36 58
40 IL24 53 IL24 48 58
I want to filter this on column e (assume it to be salary field)
Unsure if this is better performance wise as there is no schema. But this should work.