title: How to count the number of duplicate in sql
body: <p>I have tables like following
  I'd like to count duplicate and assign them.</p>
  <pre><code>customer date       type
  A       2020/8/1     a
  A       2020/8/1     b
  B       2019/5/1     a
  B       2019/6/1     c
  </code></pre>
  <p>I'd like to <code>count</code> duplicate in <code>customer</code>and<code>date</code> the, assign the number of <code>duplicate</code> of them.</p>
  <p><code>[&quot;customer,&quot;date&quot;]</code></p>
  <pre><code>customer date     type     duplicate
  A       2020/8/1   a       2
  A       2020/8/1   b       2
  B       2019/5/1   a       1
  B       2019/6/1   c       1
  
  </code></pre>
  <p>If someone has opinion to assign the number of duplicated rows.
  Please let me know. thanks</p>