I want to select data from following table group by date
date btype amount
1-2-2017 income 1000
1-2-2017 income 200
1-2-2017 Expense 100
1-2-2017 Expense 200
2-2-2017 income 1000
2-2-2017 income 500
2-2-2017 Expense 1000
3-2-2017 income 2000
3-2-2017 Expense 500
So my result should look like this.
date Income Expense
1-2-2017 1200 300
2-2-2017 1500 1000
3-2-2017 2000 500
Will some body guide me to how to write SQL query to achieve this behavior!