title: sas: proc sql select into with more than one output
body: <p>I have following dataset</p>
  
  <pre><code>data height;
      input name $ var $ value;
      datalines;
  John test1 175
  Peter test1 180
  Chris test1 140
  John test2 178
  Peter test2 182
  Chris test2 148
  ;
  run;
  </code></pre>
  
  <p>I would like to make <strong>mean</strong> value of 2 tests for <strong>each students</strong></p>
  
  <p>I able to make a new variable named mean_v_John by following</p>
  
  <pre><code>proc sql;
      select mean(value) into: mean_v_John
      from height
      where name = 'John';
  quit;
  
  %put &amp;mean_v_John.;
  </code></pre>
  
  <p>With output:</p>
  
  <pre><code>2216  %put &amp;mean_v_John.;
  176.5
  </code></pre>
  
  <p><strong>Problem:</strong> <em>How can i auto detect how many students and create variable with &amp;mean_v_NAME? In this example there will be 3 variables.</em></p>