I want to do GROUP_CONCAT in select query in sequelize here is my requirement what i want
SELECT `group_name`, `description`, GROUP_CONCAT(`module_name`) FROM `group_access` GROUP BY `group_name`
I want to write this type of query in sequelize.
This is what i tried.
groupAccess.findAll({
attributes: ['group_name', 'description', 'GROUP_CONCAT(module_name)'],
group: ['group_name']
})
But it is showing error Unknown column 'GROUP_CONCAT(module_name)' in 'field list'
How to write GROUP_CONCAT in sequelize. I even searched in there website but not found any solution. any help will be appreciated.