Du kan bruge denne forespørgsel -
SELECT
supplier_id,
MAX(IF(date = '2012-01-01', value, NULL)) AS '2012-01-01',
MAX(IF(date = '2012-01-03', value, NULL)) AS '2012-01-03',
MAX(IF(date = '2012-05-01', value, NULL)) AS '2012-05-01'
FROM (
SELECT supplier_id, DATE(date) date, CONCAT(SUM(price), '(', qty, ')') value FROM supplier
GROUP BY supplier_id, DATE(date)
) t
GROUP BY supplier_id;
+-------------+------------+------------+------------+
| supplier_id | 2012-01-01 | 2012-01-03 | 2012-05-01 |
+-------------+------------+------------+------------+
| 1 | 500.00(2) | 450.00(10) | NULL |
| 2 | 400.00(5) | NULL | NULL |
| 3 | NULL | NULL | 500.00(1) |
+-------------+------------+------------+------------+
Det giver det resultat, du ønsker. Men hvis du vil gøre det dynamisk, så tag et kig på denne artikel 'Automatiser pivottabelforespørgsler' - http://www.artfulsoftware.com/infotree/queries.php#523 , eller dette link - Dynamiske pivottabeller .