Ok ya saque el servicio y lo dejo asi:
Código sql:
Ver originalSELECT FACTURA, MOVIL,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil),
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'BAM' AND) AS BAM,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'MMS' AND) AS MMS,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'RPV' AND) AS RPV,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'SME' AND) AS SME,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'SMR' AND) AS SMR,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'TEL' AND) AS TEL,
(SELECT SUM(valor + sobrecargo)
FROM trafico
WHERE factura = a.factura, movil = a.movil AND SERVICIO = 'TLL' AND) AS TLL
FROM TRAFICO a
WHERE (FACTURA = '16209216')
GROUP BY FACTURA, MOVIL
Pero me arroja un error dice: linea 1 sintaxsis incorrecta cerca de ','
mira saque:
SELECT FACTURA, MOVIL,
para ver si seguia el error y de todas formas me indicaba el mismo error sin esa sentencia y en la linea 1