Apollo.io Interview Question

Stack-based Python question regarding finding the k nearest neighbors. SQL questions around window functions.