I have table like this -
ID doc_id approval_status
1 1 0
2 1 1
3 1 3
4 2 1
5 2 1
6 3 1
I would want to write a sql which will give me the doc_id and the approval status
like
doc_id approval_status
1 3
2 1
3 1
where 1 stands for approved and 3 stands for denied.
Which is the best way in SQL to do this.
ID doc_id approval_status
1 1 0
2 1 1
3 1 3
4 2 1
5 2 1
6 3 1
I would want to write a sql which will give me the doc_id and the approval status
like
doc_id approval_status
1 3
2 1
3 1
where 1 stands for approved and 3 stands for denied.
Which is the best way in SQL to do this.