Implement ordered minimum window query partially.