Código SQL:
Ver originalSELECT nomven,SUM("2000") AS "2000" , SUM("2001") "2001" , SUM("2002") AS "2002",SUM("2003") "2003" FROM
(
SELECT nomven,
CASE WHEN añoven = 2000 THEN sueldo ELSE 0 END AS "2000",
CASE WHEN añoven = 2001 THEN sueldo ELSE 0 END AS "2001" ,
CASE WHEN añoven = 2002 THEN sueldo ELSE 0 END AS "2002",
CASE WHEN añoven = 2003 THEN sueldo ELSE 0 END AS "2003"
FROM vendedores) t1 GROUP BY nomven
Saludos!