Posts by Edival • 146 points
1 post
-
3
votes2
answers358
viewsA: How can I select unique data in SQL?
SELECT DISTINCT EX.GSM, EX.MOTIVO_ENVIO, EX.STATUS FROM EXPORT EX WHERE EX.STATUS = 'ANOMALIA TEMPORÁRIA' AND EXISTS ( SELECT TMP.GSM FROM EXPORT TMP WHERE TMP.GSM = EX.GSM GROUP BY TMP.GSM HAVING…