Add DISTINCT to queue query.