I have created two tables in NODEJS+ MYSQL
[1,2,3,4,5])I need to retrieve data with role details using knex+bookshelf
Expected result:
[ username:'abc'
password: '1234'
rolesid:[ {id:1, role:'admin'}, {id:2, role:'cashier'}]
]
How can write a SQL statement to do this?