sql window functions practice hackerrank