<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Summarize Multiple Tables into one Table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094827#M45120</link>
    <description>&lt;P&gt;If the database is an Enterprise Geodatabase, you can use this SQL query to create a query layer (saved in the map document) or database view (saved in the database):&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT d.OBJECTID, d.Shape, d.AreaCode, a.AverageAge, i.AverageIncome
FROM Districts d

LEFT JOIN (
  SELECT AreaCode, AVG(Age) AS "AverageAge"
  FROM AgeData
  GROUP BY AreaCode
  ) AS "a"
ON a.AreaCode = d.AreaCode

LEFT JOIN (
  SELECT AreaCode, AVG(Income) AS "AverageIncome"
  FROM IncomeData
  GROUP BY AreaCode
  ) AS "i"
ON i.AreaCode = d.AreaCode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/make-query-layer.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/make-query-layer.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/create-database-view.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Sep 2021 09:03:32 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2021-09-02T09:03:32Z</dc:date>
    <item>
      <title>Summarize Multiple Tables into one Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094817#M45118</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a database, with a shapefile representing different settlements and 2 tables representing different data about individuals within these settlements. These tables are constantly updated from the field through field maps. I have shown an indicative example in the images below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_0-1630567845394.png" style="width: 292px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22267i562F0A00F81543D5/image-dimensions/292x105?v=v2" width="292" height="105" role="button" title="VenugopalAgrawal_0-1630567845394.png" alt="VenugopalAgrawal_0-1630567845394.png" /&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_1-1630567914415.png" style="width: 257px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22268i0D5F06C332B39475/image-dimensions/257x120?v=v2" width="257" height="120" role="button" title="VenugopalAgrawal_1-1630567914415.png" alt="VenugopalAgrawal_1-1630567914415.png" /&gt;&lt;/span&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_3-1630567988207.png" style="width: 265px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22270iA6D55EF0B65EE4CB/image-dimensions/265x103?v=v2" width="265" height="103" role="button" title="VenugopalAgrawal_3-1630567988207.png" alt="VenugopalAgrawal_3-1630567988207.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want to create a summary table that can summarize the data from both the age and income table at the same time. The summary table should look like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_4-1630568062994.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22271i0086BC93DD8544E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VenugopalAgrawal_4-1630568062994.png" alt="VenugopalAgrawal_4-1630568062994.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of a tool or workflow that can accomplish this?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 07:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094817#M45118</guid>
      <dc:creator>VenugopalAgrawal</dc:creator>
      <dc:date>2021-09-02T07:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Multiple Tables into one Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094827#M45120</link>
      <description>&lt;P&gt;If the database is an Enterprise Geodatabase, you can use this SQL query to create a query layer (saved in the map document) or database view (saved in the database):&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;SELECT d.OBJECTID, d.Shape, d.AreaCode, a.AverageAge, i.AverageIncome
FROM Districts d

LEFT JOIN (
  SELECT AreaCode, AVG(Age) AS "AverageAge"
  FROM AgeData
  GROUP BY AreaCode
  ) AS "a"
ON a.AreaCode = d.AreaCode

LEFT JOIN (
  SELECT AreaCode, AVG(Income) AS "AverageIncome"
  FROM IncomeData
  GROUP BY AreaCode
  ) AS "i"
ON i.AreaCode = d.AreaCode&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/make-query-layer.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/make-query-layer.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/create-database-view.htm" target="_blank" rel="noopener"&gt;https://pro.arcgis.com/de/pro-app/latest/tool-reference/data-management/create-database-view.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 09:03:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094827#M45120</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-09-02T09:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Multiple Tables into one Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094840#M45121</link>
      <description>&lt;P&gt;Hi Johannes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for responding. However, the issue here for me would be that I am not familiar with Scripts or Queries, so I don't think I will be able to try out your suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I did try to automate the process using a sequence in ModelBuilder. In that particular database, I had 3 tables to summarize, so I made a model which looked like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_0-1630577083363.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22276i83FC8994A3B38994/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VenugopalAgrawal_0-1630577083363.png" alt="VenugopalAgrawal_0-1630577083363.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While this did give me the result that I wanted, The issue is that Every time I run the model, rather than updating the fields in the final output table, it adds new fields to the table. Do you know if there is any way that this can be avoided? After running the model 3 times, the output table looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VenugopalAgrawal_1-1630577239433.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22277iA937557243CD01A8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VenugopalAgrawal_1-1630577239433.png" alt="VenugopalAgrawal_1-1630577239433.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So rather than these new fields being added, i am trying to figure out how to get the other fields to be updated.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 10:07:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094840#M45121</guid>
      <dc:creator>VenugopalAgrawal</dc:creator>
      <dc:date>2021-09-02T10:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Summarize Multiple Tables into one Table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094844#M45123</link>
      <description>&lt;UL&gt;&lt;LI&gt;Delete all Mean_Amount and Mean_Age fields&lt;/LI&gt;&lt;LI&gt;Create Mean_Amount and Mean_Age in your summary table&lt;/LI&gt;&lt;LI&gt;After "Join Field (2)", calculate the original fields to be equal to the newly joined fields, then delete the joined fields.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Thu, 02 Sep 2021 10:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/summarize-multiple-tables-into-one-table/m-p/1094844#M45123</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-09-02T10:23:46Z</dc:date>
    </item>
  </channel>
</rss>

