title: Help with an SQL query on a single (comments) table (screenshot included)
body: <p>Please see screenshot:</p>
  
  <p><img src="https://imgur.com/cTilv.gif" alt="screenshot"></p>
  
  <p>Goal:</p>
  
  <ul>
  <li>id like to have comments nested 1 level deep</li>
  <li>The comments would be arranged so that rating of the parent is in descending order</li>
  <li>the rating of the children comments is irrelevant</li>
  </ul>
  
  <p>The left hand side of the screenshot shows the output that Id like. The RHS shows the table data. All of the comments are held in 1 table.</p>
  
  <p>Im a beginner with SQL queries, the best I can do is:</p>
  
  <pre><code>SELECT * 
  FROM [Comments] 
  WHERE ([ArticleId] = @ArticleId) ORDER BY [ThreadId] DESC, [DateMade] 
  </code></pre>
  
  <p>This somewhat does the job, but it obviously neglects the rating. So the above statement would show output where Bobs Comment and all of the children comments are before Amy's and her childrens comments. 
  How can I run this query correctly?</p>