title: How to create an output row if a proc sql “group by” group has no no observations
body: <p>I am working in SAS Enterprise guide and am running a proc sql query as follows: </p>
  
  <pre><code>proc sql; 
      CREATE TABLE average_apples AS
      SELECT farm, size, type, mean(apples) as average_apples
      FROM input_table
      GROUP BY farm, size, type
      ;
  quit; 
  </code></pre>
  
  <p>For some of the data sets I am running this query on there are groups which have no observations assigned to them, so there is no entry for them in the query output. </p>
  
  <p>How can I force this query to return a row for each of my groups (for example with a value of <code>0</code>in the <code>apples</code> column?</p>
  
  <p>Thanks up front for the help!</p>