title: group after order
body: <p>In cakephp 2 I want to group table after descending order
  always returned the first record of table
  but I want returned last record by ordering</p>
  
  <p>my data, code and result in here:</p>
  
  <p>My data in table:
  <img src="https://i.stack.imgur.com/Cc7QZ.jpg" alt="table data"></p>
  
  <p>Code in controller:</p>
  
  <pre><code>$books = $this-&gt;Book-&gt;find('all', array(
      'order' =&gt; array('age' =&gt; 'DESC'),
      'group' =&gt; 'name'
  ));
  print_r($books);
  </code></pre>
  
  <p>Result after the code above:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
      (
          [Book] =&gt; Array
          (
              [id] =&gt; 1
              [name] =&gt; ramin
              [family] =&gt; zardoshti
              [age] =&gt; 32
              [city] =&gt; semnan
          )
  
      )
  
      [1] =&gt; Array
      (
          [Book] =&gt; Array
          (
              [id] =&gt; 2
              [name] =&gt; esmaeil
              [family] =&gt; seydi
              [age] =&gt; 30
              [city] =&gt; semnan
          )
  
      )
  
  )
  </code></pre>
  
  <p>But I want this result:</p>
  
  <pre><code>    Array
  (
      [0] =&gt; Array
      (
          [Book] =&gt; Array
          (
              [id] =&gt; 1
              [name] =&gt; ramin
              [family] =&gt; zardoshti
              [age] =&gt; 42
              [city] =&gt; tehran
          )
  
      )
  
      [1] =&gt; Array
      (
          [Book] =&gt; Array
          (
              [id] =&gt; 2
              [name] =&gt; esmaeil
              [family] =&gt; seydi
              [age] =&gt; 30
              [city] =&gt; semnan
          )
  
      )
  
  )
  </code></pre>