title: SQL query - select rows with at least two duplicate values
body: <p>Here is my sample table:</p>
  
  <pre><code>|"id","singlesaleid","quantity"
  -------------------------------------
  | 1,   "00278e0f",    37
  | 2,   "00278e0f",    38
  | 3,   "002ebd2e",    37
  | 4,   "00380783",    37
  | 5,   "003b3c35",    37
  | 6,   "003b3c35",    38
  | 7,   "0042170b",    38
  | 8,   "00421b89",    37
  | 9,   "00421b89",    38
  | 10,  "00587f02",    37
  | 11,  "00799433",    38
  | 12,  "00799433",    37
  </code></pre>
  
  <p>How to make select to choose and group only this rows that in singlesaleid column have at least two duplicates values?</p>
  
  <p>Result should be:</p>
  
  <pre><code>|"id","singlesaleid","quantity"
  -------------------------------------
  | 1,   "00278e0f",      37
  | 6,   "003b3c35",      38
  | 9,   "00421b89",      38
  | 12,  "00799433",      37
  </code></pre>
  
  <p>Can someone help?</p>