Fetch Distinct Records from the database
Opened this issue · 0 comments
segunadeleye commented
Is it possible to get distinct values from the database using fuzilly.
SearchCategory.distinct(:name).find_by_fuzzy_name(term, limit: limit)
gives
SELECT DISTINCT businesses.* FROM businesses WHERE businesses.deleted_at IS NULL AND businesses.id IN (1, 2, 3, 10, 9)
and I want
SELECT DISTINCT businesses.name FROM businesses WHERE businesses.deleted_at IS NULL AND businesses.id IN (1, 2, 3, 10, 9)
Please help.