Project Euler Hackerrank Solution For Sql