I need help to build a query that select distinct with a condition. For example:
SELECT EMP, COD, VEV, GRU, (SELECT DISTINCT CAST(EMP , CHAR(20) ) + CAST(COD