hackerrank sql intermediate certificate problems solution