Сейчас GridView выводит вот так:
Код: Выделить всё
id nummer cat_id count
1 001 1 12
2 001 2 40
3 001 3 2
4 002 1 11
5 002 2 16
6 002 3 1
Код: Выделить всё
nummer cat_id1 cat_id2 cat_id3
001 count count count
002 count count count