Hackerrank sql intermediate