title: How to get count of document and contacts of charities using SQL query from database?
body: <p>By running this query:</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT       c.Id AS charityId , c.NameArabic AS charityName, COUNT(s.CharityId) AS DocumentsConuts, COUNT(ci.CharityId) AS countcontats
  FROM            dbo.Charities AS c FULL OUTER JOIN
                           dbo.CharityDocuments AS s ON c.Id = s.CharityId
                           FULL OUTER JOIN
                           dbo.CharityContacts as ci ON c.Id = ci.CharityId
  WHERE        (s.IsActive = 1) and  (ci.IsActive = 1)
  GROUP BY c.NameArabic, c.Id
  </code></pre>
  <p>I need to get an output in this style:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>charityname</th>
  <th>DocumentCount</th>
  <th>ContactCounts</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>my-charity1</td>
  <td>5</td>
  <td>12</td>
  </tr>
  <tr>
  <td>my-charity2</td>
  <td>0</td>
  <td>9</td>
  </tr>
  <tr>
  <td>my-charity5</td>
  <td>5</td>
  <td>0</td>
  </tr>
  <tr>
  <td>my-charity5</td>
  <td>0</td>
  <td>0</td>
  </tr>
  <tr>
  <td>my-charity5</td>
  <td>8</td>
  <td>0</td>
  </tr>
  <tr>
  <td>my-charity5</td>
  <td>5</td>
  <td>5</td>
  </tr>
  </tbody>
  </table>
  </div>