Array aggregate with ORDER BY clause
The method you're describing is an acceptable way of handling this. I'm going to pass on implementing a fix right now, but may reconsider it later. Actual fix is now in: fe84246980d0b68290db9566b40dad446eefd600 That's awesome! Thanks for the quick response (and implementing the feature!).
Postgresql supports ordered array aggregation in the form of:
`ARRAY_AGG(expression [ORDER BY [sort_expression {ASC | DESC}], [...])`

The way I currently implement it:
```
fn.array_agg(NodeList([
    subscriptions_q.c.topic_id,
    SQL("ORDER BY"),
    popularity_q.c.popularity.asc(),
]))
```

Do you happen to know a nicer way of implementing array_agg's order by clause using peewee? If not, would you be willing to accept a PR that adds a function that adds this functionality to f.e. playhouse.postgres_ext?