title: ColdFusion - Output Grouping From a Query
body: <p>I have a great question that is probably bone-head simple.  I have the following query:</p>
  
  <pre><code>&lt;cfquery name="getempareview" dbtype="query"&gt;
    SELECT firstname,lastname,deptname,supcode
    FROM getreviews
    WHERE supcode IN (#preserveSingleQuotes(setsupcode)#)
  &lt;/cfquery&gt;
  </code></pre>
  
  <p>What I need to do is output so that the supcode has the other data under it in a list.  So, if I have 100 rows of data and the supcode is the same on 25 of the records, just have the following:</p>
  
  <p>supcode
       firstname lastname - deptname (all 25 records would be listed out here)</p>
  
  <p>Any help would be greatly appreciated.</p>