how can I set a distinct to the result of a select that contains another distinct?

0

This query gives me repeated data, and I want to give a distinct to the result of it. help me please, thanks in advance.

 SELECT DISTINCT c.*, IF (c.code = 'FF', "INICIO" , "-") AS PARTIDA,
    IF(re.code_enlace = 'FF', CONCAT("INVITADO DE ", r.code_enlace),
    CONCAT("INVITADO DE", c.code)) AS INVITADO_POR FROM clientes c,
    relacion r, relacion re WHERE r.code_enlace = 'FF' AND ((c.code =
    r.code OR c.code = 'FF') OR (re.code_enlace = r.code AND c.code =
    re.code)) ORDER BY PARTIDA DESC, INVITADO_POR ;
    
asked by Jhon Jesus 22.09.2018 в 00:38
source

0 answers