title: SQL Count results
body: <pre><code>select distinct
  LsPO AS 'PO Listed',
  LsSuID AS 'Supplier ID',
  LSShipSpeed AS 'Ship Speed',
  count('PO Listed') as 'PO Count'
  From csn_order..TblLoadShipping
  where 
  datalength(LSPO) = '10' 
  and LsDateLoaded &gt;= DATEADD(day,-1, GETDATE())
  and lspo like 'CS%'
  and lsshipspeed is not null
  group by lspo, lssuid, lsshipspeed
  order by 'PO Listed' desc
  </code></pre>
  
  <p>In PO Listed, I get a PO one time, but the PO Count column is still giving me the result of 141, counting the number of instances that PO had prior to either the where or the distinct filters.</p>
  
  <p>Maybe Im going about this entirely the wrong way. </p>
  
  <p>Here are some results:</p>
  
  <pre><code>CS89980125  14347   153 1
  CS89980122  22471   1   1
  CS89980113  420 153 1
  CS89980113  420 GR  1
  </code></pre>
  
  <p>Id like the last column, the counts, to indicate that CS89980113    is appearing twice</p>