I have a table that holds details of activities carried out by individuals - contents of this table is similar to the following:
| Person | Category | Activit
this is a simple example
SELECT Person, MAX(CASE Category WHEN 'X' THEN Activity ELSE 0 END) AS 'X' MAX(CASE Category WHEN 'Y' THEN Activity ELSE 0 END) AS 'Y' MAX(CASE Category WHEN 'Z' THEN Activity ELSE 0 END) AS 'Z' FROM mytable GROUP BY Person