title: request a sql query
body: <p>I Have a Table For example <code>posts</code> With this structure and Data :</p>
  
  <pre><code>ID | CatID | SubCatID | Title
  -----------------------------
  1 | 84 | 85 | Test 1
  2 | 84 | 86 | Test 2
  3 | 84 | 87 | Test 3
  4 | 84 | 85 | Test 4
  5 | 84 | 85 | Test 5
  6 | 84 | 86 | Test 6
  </code></pre>
  
  <p>I want 1 query that return rows that group by <code>SubCatID</code> and return rows that have a MaxID From each SubCat</p>
  
  <p>It means I want to return this list:</p>
  
  <pre><code>ID | CatID | SubCatID | Title
  --------------------------------
  5 | 84 | 85 | Test 5
  6 | 84 | 86 | Test 6
  3 | 84 | 87 | Test 3
  </code></pre>