title: GROUP BY and SUMS in MS ACCESS
body: <p>I'm trying to get a report of how many article have been sold, especially which one was sold more, both in terms of numbers and price.</p>
  
  <p>I'm trying the above query, thinking that using the <code>[PRICE]*[total]</code> in the <code>group by</code> expression, it could worked. unluckily it does not. I've try also to put the alias in the group by expression, but nothing more, it only says that I need to use a grouping expression for the column: <code>[PRICE]*[total]</code> which is what I thought I have done.</p>
  
  <pre><code>SELECT TOP 20 ARTIC, Sum(TOTGIA) AS total, [PRICE]*[total] AS a
  FROM Car
  GROUP BY ARTIC, [PRICE]*[total]
  ORDER BY Sum(TOTGIA) DESC;
  </code></pre>
  
  <p>anyone could lead me in the good direction?</p>
  
  <p>the error is:</p>
  
  <pre><code>"You tried to execute a query that does not include the specified expression '[PRICE]*[total]' as part of an aggregate function."
  </code></pre>
  
  <p>the table is something like this:</p>
  
  <pre><code>|artic|totgia|price
  +++++++++++++++++++
  |aaa  |  1   | 10
  |aaa  |  4   | 10
  |bbb  |  1   | 200
  </code></pre>
  
  <p>I would like to have:</p>
  
  <pre><code>|aaa| 5 | 50
  |bbb| 1 | 200
  </code></pre>
  
  <p>so <code>aaa</code> is the first one for number of sells, but <code>bbb</code> is first for cash</p>