I have the following query
SELECT DISTINCT
HPNESTANC.ADNINGRES AS ESTANCIA1 , HPNESTANC.HESFECING AS FECHA_INGRESO FROM HPNESTANC
WHERE EXISTS
(SELECT MAX( HPNESTANC.ADNINGRES), MAX(HPNESTANC.HESFECING) FROM HPNESTANC WHERE HPNDEFCAM IN(80,237, 238,239,240,241,242,243,244,
245,247,248,249,245,247,248,249,250,251,252,253,254,255,256,257,256,357)
)ORDER BY 1
but I do not want to repeat those values in the result, the capture is the following: