title: Persist an average value of all points within a polygon to new field
body: <p>I have a polygon Zones layer and a Address points layer.  </p>
  
  <p>The following query completes:</p>
  
  <pre><code>SELECT zones.OBJECTID, Avg(address.WalkTime)
  FROM address
  JOIN zones
  ON zones.Shape.STContains(address.Shape) = 1
  GROUP BY mb.OBJECTID
  
  ╔══════════╦════════════════╗
  ║ OBJECTID ║ No column Name ║
  ╠══════════╬════════════════╣
  ║       31 ║ 8.1            ║
  ║       41 ║ 5.3            ║
  ║       55 ║ 12.5           ║
  ║       78 ║ 10.4           ║
  ║       94 ║ 9.7            ║
  ╚══════════╩════════════════╝
  </code></pre>
  
  <p>I have a new empty numeric column in Zones called <strong>Avg_WalkTime</strong></p>
  
  <p><strong>How do I adapt the query to insert the average value into this column?</strong></p>
  
  <p><em>An attempt:</em></p>
  
  <pre><code>UPDATE 
      zones 
  SET  
      zones.Avg_WalkTime = (
      SELECT Avg(address.WalkTime)
          FROM address
      WHERE zones.Shape.STContains(address.Shape) = 1
  </code></pre>
  
  <p>However, this fails with incorrect syntax?</p>