結果 : sql window function in case statement