You should not use the SQL keyword 'DISTINCT' if the data map includes user-defined fields. Attempting to use DISTINCT with user defined fields causes a message in the logfile 'SELECT DISTINCT not guaranteed with Expressions'.
If DISTINCT is essential to a query then the best approach is to create another table in the data map that contains only the fields that are actually required for that query.