title: Access 2003/2007 : Query to find average of one text field grouped by another in table
body: <p>So lets say I have a table that looks something like this:</p>
  
  <pre><code>ItemName                ProductType
  ----------------------------------------------------------
  Name1                   Type1
  Name2                   Type1
  Name3                   Type1
  Name4                   Type2
  Name5                   Type3
  </code></pre>
  
  <p>and so on for thousands of records. I want a sql statement to find the average number of Names per Types. I want to use it in vba, behind a form.</p>
  
  <p>How would I go about this? I have the sneaking suspision that this is something simple that is escaping me right now.</p>
  
  <p>EDIT: Sorry....a little unclear. I mean in a table like fashion, have the types listed out with a count for each of the relative Names</p>
  
  <pre><code>Averages
  Type                Count of Names
  -------------------------------------------
  Type1                   5
  Type2                   6
  </code></pre>
  
  <p>so basically see how many names applicable to types, what Inner Select statement should I use to accomplish this?</p>
  
  <p>Thanks
  Justin</p>