I want to convert rows into columns, here is my table
Id Total
1 50
2 50
3 150
Basically i want this output
ID 50
1 1
2 1
3 (null)
What ive tried so far is
select *
from
(
select id, total
from <table>
) src
pivot
(
//Here is where i'm stuck...what should i write here
)