title: SQL: How do you select only groups that do not contain a certain value?
body: <p>Say I have a table:</p>
  
  <pre><code>Restaurant locations: 
  
  RESTAURANT_NO | RESTAURANT_LOCATION
  -----------------------------------
  1             |            City A
  1             |            City B
  2             |            City A
  2             |            City B
  2             |            City C
  3             |            City C
  4             |            City A
  4             |            City B
  </code></pre>
  
  <p>How would I be able to group them together and also only select the 
  RESTAURANT_NO that do not have locations in city C?</p>
  
  <p>Using this example, I want to return:</p>
  
  <pre><code> RESTAURANT_NO
   -------------
   1
   4
  </code></pre>
  
  <p>Since RESTAURANT_NO 2 and 3 both have locations in city C.</p>
  
  <p>I do not know how to group RESTAURANT_NO together while also trying only to select the groups that meet this requirement.</p>
  
  <p>EDIT: I got this working.</p>
  
  <p>However, there is one last thing that I still have not been able to figure out.
  The following table has the ID number of people along with cities they have worked in:</p>
  
  <pre><code>PERSON_NO | CITY_NAME
  ---------------------
  1         |    City A
  2         |    City B
  3         |    City A
  3         |    City B
  3         |    City C
  4         |    City A
  4         |    City B
  4         |    City C
  </code></pre>
  
  <p>How would I be able to get the PERSON_NO of all the people
  who have lived in all three cities, A,B, and C?</p>
  
  <p>I want to return</p>
  
  <pre><code>PERSON_NO
  ---------
  3
  4
  </code></pre>
  
  <p>Thanks, again. I haven't had that much experience with SQL and so I'm not sure what to do.</p>