title: Count New Response and Cumulative Percent Per Month
body: <p>If I have several customers responding month after month, I want to count them only in the first month they responded. I can achieve this by creating temp tables for each month and comparing month over month, but it looks ugly with several temp tables. I'm pretty sure that there's a better way to do this (I don't know if Rank() will work). Can someone show me code please?</p>
  
  <p><pre><code>
      declare @Something table
  (
      CustID Char(10),
      MthId char(2),
      ResponseDate datetime
  )</p>
  
  <p>insert @Something
  select 'Cust1', '1', '5/6/13' union all
  select 'Cust1', '2', '6/13/13' union all
  select 'Cust1', '3', '7/13/13' union all
  select 'Cust2', '1', '5/20/13' union all
  select 'Cust2', '2', '6/22/13' union all
  select 'Cust3', '2', '6/20/13' union all
  select 'Cust4', '2', '6/24/13' union all
  select 'Cust4', '3', '7/24/13' union all
  select 'Cust5', '4', '8/28/13' union all
  select 'Cust6', '3', '7/24/13'
  </pre></code></p>
  
  <p>This is the output I'm expecting in 3 columns (I don't really need the 2nd col - it's there to explain further)</p>
  
  <p>Month, How many "cumulative" new customers responded that month, What's the cumulative percent of total customers contacted new every month. </p>
  
  <pre><code>MthId   NewCustomerResponse CumulativeNewCustomerResponse Cumulative%Responded    
  1       2                     2                            33.3     
  2       2                     4                            66.7     
  3       1                     5                            83.3 
  4       1                     6                            100.0    
  </code></pre>