asi:
Código MySQL:
Ver originalSELECT cod_suc
, [001] AS INDIRECTO
,[002] AS DIRECTO
,[003] AS CORPORATIVO
, ([001] + [002] + [003]) AS TOTAL
(SELECT cod_suc
,tip_recep
, cat_dis
, cat_dis
AS "TIPO_VENTA" , semana
FROM temporalGerente
) AS temporal
PIVOT
(
FOR TIPO_VENTA
IN ([001],[002],[003])) AS pivotTable
WHERE tip_recep
IN ('PS','SN','WB')