title: Changing AQL so that sub-query result is flattened into two seperate arrays
body: <p>This query works:</p>
  
  <pre><code>FOR person IN 1..1 INBOUND @companyID employed_by
      LET age = DATE_DIFF(person.age * 1000, @currentTime * 1000, 'y')
      COLLECT label = age WITH COUNT INTO value
          RETURN {data: label, frequency: value}
  </code></pre>
  
  <p>And gives me this:</p>
  
  <pre><code>[
      {
          data: 18,
          frequency: 69
      },
      {
          data: 19,
          frequency: 73
      },
      {
          data: 20,
          frequency: 86
      }
  ]
  </code></pre>
  
  <p>But what i really want is something like this</p>
  
  <pre><code>{
      data: [18, 19, 20]
      frequency: [69, 73, 86]
  }
  </code></pre>
  
  <p>I was expecting the following query to work - but the PUSH statements fail (syntax error), i tried a bunch of PUSH statements in FOR loops but can't get them to work as i expect, which would imply i am doing something <strong>absolutely mental</strong></p>
  
  <pre><code>LET data = []
  LET frequency = []
  LET temp = 
          (
              FOR person IN 1..1 INBOUND @companyID employed_by
                  LET age = DATE_DIFF(person.age * 1000, @currentTime * 1000, 'y')
                  COLLECT label = age WITH COUNT INTO value
                      data = PUSH(data, label)
                      frequency = PUSH(frequency, value)
                      RETURN true
          )
  RETURN {data: data, frequency: frequency}
  </code></pre>
  
  <p>Any advice would be great!</p>