I am a begginer using this kind of query in SQL Server and I have a big table similar as I'm showing, the trouble that I have is that I don't know how to group and sum at the same time, I need to sum the SUP with every SIG with the code
CODE SIG SUP
R501004002 BCO 30
R501004002 BCO 31.27
R501004008 BCO 34.09
R501004008 BCO 35.94
R501004003 MET 42
R501004020 RIP 42.5
R501004039 BCO 47.44
R501004020 RIP 68.56
The result that I want to show is something like this
CODE BCO MET RIP
R501004002 61.27 0 0
R501004003 0 42 0
R501004008 70.03 0 0
R501004020 0 0 111.06
R501004039 47.44 0 0
I group the code