Omnify interview question

1.practices sql 2.js code(midium) Array of object