Graph query to fetch issues analytics for a repository

Hey Guys, 

Can anyone help me with Graph query to get Issue analytics for a repository?

I am new to GraphQL and reached here 

query {
  repository(owner:"bitcoin", name:"bitcoin") {
    issues(last:20, states:OPEN) {
      edges {
        node {
          title
          url
        }
      }
    }
  }
}

I want to know how many issues opened or closed in a given time (let’s say in a year).

The trend of issue opened or closed for a given time (Let’s say in a year).

The average time it takes to close an issue.