title: MYSQL - having count(*) without group by
body: <p>I have a MySQL table</p>
  
  <pre><code>discount_vouchers
  ------------------
  id
  email
  test_id
  </code></pre>
  
  <p>My goal is to list all vouchers that appears more than once with a given email and a given test_id from the GROUP BY:</p>
  
  <pre><code>GROUP BY email, test_id
  HAVING count(*) &gt;1
  </code></pre>
  
  <p>How to get read of this group by?</p>
  
  <p>Here is an example:</p>
  
  <pre><code>discount_vouchers
  ------------------
  1    1@test.com    20
  2    1@test.com    10
  3    1@test.com    20
  4    2@test.com    30
  </code></pre>
  
  <p>I would like to have as a result:</p>
  
  <pre><code>id     email     test_id   count
  1    1@test.com    20       2
  2    1@test.com    10       1
  3    1@test.com    20       2
  4    2@test.com    30       2
  </code></pre>