Ergeon Interview Question

Database query optimizations, time complexity, write small code.