I have something that looks like this (SQL Fiddle here):
Date Location Value
1/1/2012 Baltimore 36
1/1/2012 Houston 36
1/1/2012 Chicago 55
2/1/2012 Baltimore 49
2/1/2012 Houston 58
2/1/2012 Chicago 51
3/1/2012 Baltimore 11
3/1/2012 Houston 13
3/1/2012 Chicago 18
However, I want it to look like this:
Date Baltimore Houston Chicago
1/1/2012 36 36 55
2/1/2012 49 58 51
3/1/2012 11 13 18
How do I group by the Date and create new columns for each distinct Location? I do not know the complete set of possible Locations. I'm working in Oracle 11g Release 2.


