DISTINCT should not be used in SQL SELECT statements | CAST Appmarq