Two Sigma interview question

genreate some random variable and a DB issue to solve