結果 : sql case statement with window function