title: How to query across three tables joined by an intermediate table?
body: <p>I just have one probably really dumb problem but I can't solve this. </p>
  
  <p>I currently have 3 tables:</p>
  
  <pre><code>PROJECT    
  PROJECT_CATEGORY     
  CATEGORY
  </code></pre>
  
  <p>Now <code>PROJECT_CATEGORY</code> is an intermediate table so it contains only primary key from <code>PROJECT</code> and <code>CATEGORY</code> like <code>pID</code> and <code>cID</code>. </p>
  
  <p>I know how I can write a query if I have a <code>pID</code> in table <code>CATEGORY</code> but in this case I only have intermediate table. So how I can create a query that will check these 3 tables and then it will show me all categories and which projects they're assigned to?</p>