title: How to select columns data in different array objects in SQL?
body: <p>Suppose I have following query:</p>
  
  <pre><code>select e.name, e.city, d.name, d.area
  from employee as e
      inner join department as d on e.id = d.eid;
  </code></pre>
  
  <p>I want the query to get an array response with two array objects.</p>
  
  <p>The first array object <strong>Employee</strong> should contain the following columns: <code>e.name</code>, <code>e.city</code>. </p>
  
  <p>The second array object <strong>Department</strong> should contain the following columns: <code>d.name</code>, <code>d.area</code>.</p>
  
  <p>Is there any way to get the data this way? If any so please help me!</p>