MRI Software Interview Question

Solve some basic sql and javascript problems using loops and sorting.