Hey there ! I'm trying to query for the total numb...
# ask-community
t
Hey there ! I'm trying to query for the total number of flow runs that are in Success state but the where clause seems to not affect the returned answer. Why ?
Copy code
query {
  flow(
    where: {name: {_eq: "YYY"}, project: {name: {_eq: "XXX"}}, flow_runs: {state: { _eq: "Success"}}}
  ) {
    flow_runs_aggregate{
      aggregate {
        count
      }
    }
  }
}
Can you help me query the total number of successful flow runs of a flow from the beginning of time?
k
This should be close. Just put your conditions in the where. Also I think standard retention for Flow history is 2 weeks or 3 weeks so that’s the limit you can query
t
Hey how do i find the project id given its name ?
Nah i got it . dont worry