I have searched a while and can't find an answer to my problem. I have a table that looks like this:
date name status
2011-01-01 m1 online
2011-01-01 m2 offline
2011-01-01 m3 online
2011-01-02 m1 offline
2011-01-02 m2 offline
2011-01-02 m3 online
I want to create a view that will looks like the following:
date m1 m2 m3
2011-01-01 online offline online
2011-01-02 offline offline online
Where values under the the 'name' column are distinct and has a fixed number of values, say 20 different values (m1 ... m20), but can be increased as times goes. Is it possible to create a view like this? if yes, how?
Many thanks.