I have data in the following format:
Machine | week_end | widgets
A | 05-26-2013 | 5
B | 05-26-2013 | 4
A | 04-01-2013 | 6
B | 04-01-2013 | 0
I want my result set to look as follows:
Machine | 05-26-2013 | 04-01+2013 | ...
A | 5 | 6 |
B | 4 | 0 |
I'm not quite sure how to proceed here--how does one transpose a table like this without having to specify the week ends (or whatever) explicitly in the query? (DB is SQL Server 2008.)