結果 : how to use min function in case statement in sql