+ SortType::TopThreeMonths => query
+ .filter(post_aggregates::published.gt(now - 3.months()))
+ .then_order_by(post_aggregates::score.desc())
+ .then_order_by(post_aggregates::published.desc()),
+ SortType::TopSixMonths => query
+ .filter(post_aggregates::published.gt(now - 6.months()))
+ .then_order_by(post_aggregates::score.desc())
+ .then_order_by(post_aggregates::published.desc()),
+ SortType::TopNineMonths => query
+ .filter(post_aggregates::published.gt(now - 9.months()))
+ .then_order_by(post_aggregates::score.desc())
+ .then_order_by(post_aggregates::published.desc()),