OZON.ru interview question

Python + SQL interview included a window functions problem and an algorithms problem