DataEnthusiast (11/18/2014)
Hey guys, I'm fairly newbie with SQL and have been struggling with this used case. I would appreciate any help.
Table has values:
ID NL1 NL2 NL3
50 null null 21
50 null 18 null
50 20 null null
Expected result:
ID NL1 NL2 NL3
50 20 18 21
I tried using case but I didnt get anywhere. Any help would be appreciated!
select ID, MAX(NL1) as NL1, MAX(NL2) as NL2, MAX(NL3) as NL3
from myTable
group by ID;