I have one SELECT statement as follows:
SELECT
lpt_titulo as tmt_titulo,
tmd_nombre as tmt_nombre,
tmd_album as tmt_album,
SUM(lpt_puntos) AS tmt_puntos
FROM listas_pre_titulos
INNER JOIN cat_tit_media ON lpt_titulo = tmd_clave "
WHERE condition
The above statement must have an EXCEPT clause which includes another SELECT statement almost identical, the difference is in the WHERE condition and also in one of the fields; "SUM(lpt_puntos) AS tmt_puntos" should be "SUM(lpt_puntos) * -1 AS tmt_puntos". I only need to convert such a field to a negative value.
How does the EXCEPT work? Do fields should be identical?
I need the difference to be on the first 3 fields.
Respectfully,
Jorge Maldonado