title: Get count of row and sum group by quarter of date, if another column doesnt exits a value in SQL Server
body: <p>I have some sample data:</p>
  
  <pre><code>Date              Status       OfferNum        Amount
  ------------------------------------------------------
  2016/10/30      -   1      -     2000      -  1000,00
  2016/08/25      -   0      -     2000      -  1100,00
  2016/07/12      -   0      -     2001      -  1200,00
  2016/08/30      -   0      -     2001      -  1300,00
  2016/07/12      -   1      -     2002      -  1400,00
  2016/08/30      -   1      -     2002      -  1500,00
  2016/08/30      -   1      -     2003      -  1600,00
  </code></pre>
  
  <p>I don't want to count if one of <code>offerNum</code> status value has 1 and in the same quarter(if it has 1 but it isnt same quarter it has to be count). But I want to sum all of the amount(it isnt depends status column)</p>
  
  <p>Here is the result that I want:</p>
  
  <pre><code>Quarter   Count                          TotalAmount
  ----------------------------------------------------
  2016/Q3     2 (offerNum 2002 and 2003)      8100,00
  2016/Q4     1 (offerNum 2000)               1000,00
  </code></pre>
  
  <p>Here is the sqlfiddle : <a href="http://sqlfiddle.com/#!6/eac9d" rel="nofollow">http://sqlfiddle.com/#!6/eac9d</a></p>