title: SQL how to count mean by sql
body: <p>I have a problem, I have a data set where it calculates Sum correctly for me, but mean calculates me 2x. This is my code:</p>
  <pre><code>PROC SQL;
    CREATE TABLE jeden AS 
    SELECT /* SUM_of_WYCENA */
             (mean(t1.WYCENA)) AS SUM_of_WYCENA,
             sum(t1.wycena)
       FROM WORK.CIRS t1
       WHERE t1.DATA_DANYCH between '15Oct2021'd and '29Nov2021'd  AND t1.DEAL_BUNDLE = '1: 10.2016';
  QUIT;
  </code></pre>
  <p>This is result :
  <a href="https://i.stack.imgur.com/fM0Dp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fM0Dp.png" alt="enter image description here" /></a></p>
  <p>Its should be
  161 156 623
  Could someone tell me what happen ?</p>