Hi everyone — I’m trying to write a query using th...
# ask-community
b
Hi everyone — I’m trying to write a query using the prefect API but I not having much success. All our flows have at least 1 parameter called Scope, and I’m trying to see the latest flow_run for each parameter.scope and state combination. In SQL I’d use a window function to get the rank/row_number, partitioned by parameter.scope and state, ordering by the scheduled start date, but not sure I can achieve the same thing with graphql. Can anyone help with this?
k
Hey @Bruno Murino, I don’t think you can use GraphQL to do that. You would need to query the flow runs and use Python to filter the result.
You can query if a certain parameter exists but not on the value
b
yea I thought so — I’ll probably make do by sending multiple queries and having some loops. Thanks Kevin!