Modify queries to return distinct
Modify queries to return distinct