title: inner join Query not working
body: <pre><code>select distinct Analysed.resultId,bugOwner,Analysed.bugId as BugDet,bugType,testCaseName from Bug INNER JOIN Analysed on Analysed.bugId=Bug.bugId INNER JOIN Results on Analysed.runId=Results.runId where Analysed.runId=64
  </code></pre>
  
  <p>The above works fine.</p>
  
  <p>Now I have another table Results (resultId,runId,analysed,testname)</p>
  
  <p>I also want to include testname in my other query so I added,</p>
  
  <pre><code>select Analysed.resultId,bugOwner,Analysed.bugId as BugDet,bugType,testCaseName from Bug 
  INNER JOIN 
  Analysed on Analysed.bugId=Bug.bugId 
  INNER JOIN Results on Analysed.runId=Results.runId
  where Analysed.runId=64
  </code></pre>
  
  <p>But this query is incorrect. It duplicates the records.I guess its taking some cross product or something.
  Does anyone know how to solve it ?</p>
  
  <p>Data:</p>
  
  <p><img src="https://i.stack.imgur.com/vqRSp.png" alt="Results">
  <img src="https://i.stack.imgur.com/jVXrC.png" alt="Analysed"></p>