SELECT V.XPRO, V.PROVEEDOR, V.CPRO, V.PRODUCTO, V.UM, 
SUM(CASE WHEN V.MES='01' THEN ROUND(V.CANTIDAD,2) END) AS CAN_ENE,
AVG(CASE WHEN V.MES='01' THEN ROUND(C.PPC,5) END) AS PPC_ENE,
AVG(CASE WHEN V.MES='01' THEN V.PPV END) AS PPV_ENE,
SUM(CASE WHEN V.MES='01' THEN ROUND(V.CANTIDAD*(V.PPV - C.PPC),2) END) AS UTI_ENE,

SUM(CASE WHEN V.MES='02' THEN ROUND(V.CANTIDAD,2) END) AS CAN_FEB,
AVG(CASE WHEN V.MES='02' THEN ROUND(C.PPC,5) END) AS PPC_FEB,
AVG(CASE WHEN V.MES='02' THEN V.PPV END) AS PPV_FEB,
SUM(CASE WHEN V.MES='02' THEN ROUND(V.CANTIDAD*(V.PPV - C.PPC),2) END) AS UTI_FEB,

SUM(CASE WHEN V.MES='03' THEN ROUND(V.CANTIDAD,2) END) AS CAN_MAR,
AVG(CASE WHEN V.MES='03' THEN ROUND(C.PPC,5) END) AS PPC_MAR,
AVG(CASE WHEN V.MES='03' THEN V.PPV END) AS PPV_MAR,
SUM(CASE WHEN V.MES='03' THEN ROUND(V.CANTIDAD*(V.PPV - C.PPC),2) END) AS UTI_MAR,

SUM(CASE WHEN V.MES='04' THEN ROUND(V.CANTIDAD,2) END) AS CAN_ABR,
AVG(CASE WHEN V.MES='04' THEN ROUND(C.PPC,5) END) AS PPC_ABR,
AVG(CASE WHEN V.MES='04' THEN V.PPV END) AS PPV_ABR,
SUM(CASE WHEN V.MES='04' THEN ROUND(V.CANTIDAD*(V.PPV - C.PPC),2) END) AS UTI_ABR,

SUM(CASE WHEN V.MES='05' THEN ROUND(V.CANTIDAD,2) END) AS CAN_MAY,
AVG(CASE WHEN V.MES='05' THEN ROUND(C.PPC,5) END) AS PPC_MAY,
AVG(CASE WHEN V.MES='05' THEN V.PPV END) AS PPV_MAY,
SUM(CASE WHEN V.MES='05' THEN ROUND(V.CANTIDAD*(V.PPV - C.PPC),2) END) AS UTI_MAY,

SUM(CASE WHEN V.MES='06' THEN