[Fixed] How to get a distinct value of a row with sequelize?


I have table with value

id country 
1  india
2  usa
3  india

I need to find the distinct values from the country column using sequelize.js

here my sample code…


    attributes: ['country'],
    distinct: true
}).then(function(country) {

Is there any way to find the distict values


Try with this: https://github.com/sequelize/sequelize/issues/2996#issuecomment-141424712

Project.aggregate('country', 'DISTINCT', { plain: false })

Leave a Reply

(*) Required, Your email will not be published