Skip to content

top_n doesn't play well with desc #1008

@HarlanH

Description

@HarlanH

It looks like top_n is a wrapper around filter(min_rank(desc())), which means that top_n(x, 1, desc(col)) causes a SQL syntax error, and of course there's no way to do top_n(x, 1, asc(col)).

Perhaps a bottom_n function that does the same thing, but without the hard-coded desc?

Workaround is trivial, of course, but the symmetric API would be handy!

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions