I have some table contains rows like below;
ID Date City Income
1 2013 Kansas 10$
1 2013 Kansas 15$
1 2014 Kansas 30$
2 2013 Chicago 50$
...
I need such a query that transform it to this;
ID Date City Income1 Income2
1 2013 Kansas 10$ 15$
1 2014 Kansas 30$
2 2013 Chicago 50$
...
So I should group by ID, Date then split Income values to different columns.. This is how I try to achieve it but some thing not right;
select ID, DATE, MIN(CITY), CONCAT(INCOME,',') from [Sheet 1$] group by ID, DATE