title: Exclude an item only when there are multiple entries
body: <p>I have a table of data with policy information:</p>
  <pre><code>Row  PolicyNumber    Member ID    PolicyName
  1    1234            789          Main
  2    1265            789          Travel
  3    1523            541          Travel
  4    6778            374          Main
  5    5821            123          Main
  6    8763            123          Travel
  </code></pre>
  <p>I want to count the number of distinct MEMBERID's within each policynumber.  However, some members have more than one policynumber because some members have a travel policy and a main policy.</p>
  <p>So I want SQL to check for a count of <code>POLICYNUMBER</code> by <code>MEMBERID</code> first, and where the POLICYNUMBER count is greater than one, to bring only the policy numbers where the <code>POLICYNAME</code> is not like '%travel%'</p>
  <p>But, if the member ONLY has one policy, I want SQL to include that policy even if it's travel.</p>
  <p>So in my sample data:</p>
  <pre><code>Member 789 would be counted against policy 1234 but not 1265
  Member 541 would be counted against policy 541
  Member 374 would be counted against policy 6778
  Member 123 would be counted against policy 5821 but not 8763
  </code></pre>
  <p>Desired result would be a table of two columns, PolicyNumber and the distinct count of MemberId associated to that policy.</p>
  <p>How do I write the syntax?</p>