title: MySQL Relational Division
body: <p>I am having difficulties to solve one exercise:</p>
  
  <p>For which People there is a Restaurant, that serves ALL their favorite beers.</p>
  
  <p>(Yes, we actually have this in school :D)</p>
  
  <p>I have got 2 Tables that can be used:</p>
  
  <ul>
  <li>Table1: Favoritebeer (Name, Surname, beername)</li>
  <li>Table2: OnStock (beername, restaurant, quantity)</li>
  </ul>
  
  <p>My solution would be: OnStock % Favoritebeer</p>
  
  <p>There is no such thing like DIVISION in MySQL. Any ideas how I could solve that? I found the following on Wikipedia: <a href="http://en.wikipedia.org/wiki/Relational_algebra#Division_.28.C3.B7.29" rel="nofollow">http://en.wikipedia.org/wiki/Relational_algebra#Division_.28.C3.B7.29</a> which is exactly what I need but I am having difficulties to translate it in SQL.</p>
  
  <p>EDIT:</p>
  
  <p>Here sample data: <a href="http://www.sqlfiddle.com/#!2/34e00" rel="nofollow">http://www.sqlfiddle.com/#!2/34e00</a></p>
  
  <p>The result should be:</p>
  
  <pre><code>Bucher Rolf
  Mastroyanni Pepe
  Meier Hans
  Meier Hanspeter
  Meier Hansruedi
  Müller Heinrich
  Peters Peter
  Zarro Darween
  </code></pre>