title: MSSQL: Select rows with more than 2 occurrences in another table
body: <p>Basically I need to get a list of CampaignTitles that have more than 2 occurrences in StaffOnGrade and list the CampaignTitle, StaffNo who have a Grade rating higher then 2</p>
  
  <p>WorksOn table:</p>
  
  <pre><code>CampaignTitle      | StaffNo
  -------------------|--------
  ADVENTURE WORLD    | 11
  AIR CANADA         | 11
  CARNIVAL CRUISES   | 3
  CARNIVAL CRUISES   | 8
  CARNIVAL CRUISES   | 9
  FLIGHT CENTRE      | 7
  FLIGHT CENTRE      | 10
  HARVEYWORLD TRAVEL | 4
  LAST MINUTE        | 4
  PRINCESS CRUISES   | 3
  PRINCESS CRUISES   | 5
  PRINCESS CRUISES   | 6
  PRINCESS CRUISES   | 7
  PRINCESS CRUISES   | 11
  TRAVELSCENE        | 10
  VALUETOURS AUST    | 3
  VIRGIN AUSTRALIA   | 10
  </code></pre>
  
  <p>StaffOnGrade table:</p>
  
  <pre><code>Grade | StaffNo
  ------|--------
  1     | 2
  2     | 11
  3     | 3
  3     | 6
  3     | 7
  4     | 4
  4     | 8
  4     | 10
  5     | 5
  5     | 9
  </code></pre>
  
  <p>The following two queries achieve the individual parts, but I need it returned as one query set of results.</p>
  
  <pre><code>SELECT campaigntitle, COUNT (CAMPAIGNTITLE) As [count]
  FROM WORKSON
  GROUP BY CAMPAIGNTITLE
  HAVING COUNT(CAMPAIGNTITLE) &gt;2
  
  SELECT STAFFNO, GRADE
  FROM STAFFONGRADE
  WHERE GRADE &gt; 2
  </code></pre>
  
  <p>Hope this makes sense!</p>