I have the following table:
paymentgateway status
-------------- --------
1 1
2 2
3 1
2 3
2 3
. .
. .
. .
I am trying to write an SQL query to give the following result:
paymentgetways status1 status2 status3
-------------- ------ ------- --------
1 1 0 1
2 0 1 2
3 1 0 0
.
.
.
How can I modify my query to give the correct presentation? i dont want to use case when ,Thanks