0
As follows the query below, I need to remove from the SQL query the results that have the field CLIENTE_UNICO EQUAL TO 'MULTIPLE PURCHASES IN THE PERIOD'.
SELECT
NFE.CD_CLIENTE AS "COD. DO CLIENTE",
EMP.NOME_COMPLETO AS "CLIENTE",
(
CASE COUNT(NFE.NF) WHEN 1
THEN 'ÚNICA COMPRA NO PERÍODO'
ELSE 'MÚLTIPLAS COMPRA NO PERÍODO'
END)
AS "CLIENTE_UNICO"
FROM FANFISCA NFE
LEFT JOIN GEEMPRES EMP ON EMP.CD_EMPRESA = NFE.CD_CLIENTE
WHERE NFE.DT_EMISSAO BETWEEN TO_DATE('01/05/2020', 'DD/MM/YYYY') AND TO_DATE('31/08/2020', 'DD/MM/YYYY')
GROUP BY NFE.CD_CLIENTE, EMP.NOME_COMPLETO
Below is also the result of the consultation.
Any idea how to "delete" these results with "MULTIPLE PURCHASE IN THE PERIOD"?