Select statement with except clause - Mailing list pgsql-sql

From JORGE MALDONADO
Subject Select statement with except clause
Date
Msg-id CAAY=A79+vsQN3zzPC7CtSoJFPxbp-Kf=yxg-hdCd6AEb3i6P5Q@mail.gmail.com
Whole thread Raw
Responses Re: Select statement with except clause  (David Johnston <polobo@yahoo.com>)
List pgsql-sql
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

pgsql-sql by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re: How to right justify text in psql?
Next
From: David Johnston
Date:
Subject: Re: Select statement with except clause