Skip to content

How do you use a column that was added in a select call, in a where/order by call? #408

Answered by mkornacker
Spinnernicholas asked this question in Q&A
Discussion options

You must be logged in to vote

You are encountering a gap in the query functionality. Essentially, what you want is the equivalent of the SQL Having clause, or more generally, being able to query a DataFrame like a table:
df = t.group_by(t.hash).select(t.hash, count=pxt.functions.count(1))
result = df.where(df.count > 1)

At the moment, Pixeltable doesn't support that. However, we are aware that this is useful and are planning on adding that functionality in the not-too-distant future.

Can you tell us a little more about your use case?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Spinnernicholas
Comment options

@Spinnernicholas
Comment options

@mkornacker
Comment options

@Spinnernicholas
Comment options

Answer selected by mkornacker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants