title: Query for a skill database
body: <p>I designed following skill database with three tables:</p>
  
  <ol>
  <li>employees with columns name, personnelnumber<br></li>
  <li>skills with columns skillname, skillid<br></li>
  <li>skillmapping with columns skillid, personnelnumber, skilllevel</li>
  </ol>
  
  <p>1) and 2) just assign numbers to persons and skills. 3) assigns skill levels to employees.</p>
  
  <p>For example, row 1 3 6 in table 3) means person with personal number 3 has knowledge of skill number 1 and the knowledge level is 6.</p>
  
  <p>What I want is to retrieve persons who at the same time are skilled in </p>
  
  <ol>
  <li>skill 2 with knowledge level 3<br></li>
  <li>skill 4 with knowledge level 5 and<br> </li>
  <li>skill 8 with knowledge level 2.</li>
  </ol>
  
  <p>What would be the best way to do that? I thought about first selecting persons who meet condition 1), then select from them persons who meet condition 2) and then select from the result people meeting condition 3). But for that approach I have to create temporary tables and go beyond SQL using some procedural programming language. Isn't there a better approach?</p>