title: select dept names who have more than 2 employees whose salary is greater than 1000
body: <p>How would do the following in SQL</p>
  
  <p>"select dept names who have more than 2 employees whose salary is greater than 1000" ?</p>
  
  <pre><code>DeptId DeptName
  ------ --------
  1          one
  2          two
  3        three
  
  EmpId DeptId Salary
  ----- ------ ------
  121      1    2000
  122      1    2000
  123      1    5000
  124      1    4000
  131      2    2000
  132      2    6000
  133      2    1000
  134      2    1000
  125      3    1000
  126      3   20000
  
  
  RESULT: one
  </code></pre>