Essayez ceci :
select
workweek
,(select sum(cost) from DataTable where Catg = 'Cat1') as Cat1TotalCost
,(select sum(cost) from DataTable where Catg = 'Cat2') as Cat2TotalCost
,(select sum(cost) from DataTable where Catg = 'Cat3') as Cat3TotalCost
.
.
.
.
from DataTable
group by Workweek
Maintenant, vous regroupez par le champ semaine de travail. Aussi, j'ai changé le like
à =
pour le rendre légèrement plus rapide.