title: How can I use a Join from another table when im doing a Max to a column in ORACLE?
body: <p>Getting This issue in which I'm using a Max to a Column, it returns me the number.
  (My tables have already the Constraints).</p>
  <p>Actual Return</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>CVEANO</th>
  <th>CVENUMERO</th>
  <th>CVEACCION</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2021</td>
  <td>7</td>
  <td>4</td>
  </tr>
  <tr>
  <td>2021</td>
  <td>1</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I Want to Return from TblACCION</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>CVEANO</th>
  <th>CVENUMERO</th>
  <th>CVEACCION</th>
  <th>CVEACCION NAME Brought from tblACCION</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2021</td>
  <td>7</td>
  <td>4</td>
  <td>NAME FOR NUMBER 4</td>
  </tr>
  <tr>
  <td>2021</td>
  <td>1</td>
  <td>3</td>
  <td>NAME FOR NUMBER 3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>My actual Query is</p>
  <pre><code> SELECT
  *
  FROM
      (   
  SELECT
      cveano,
      cvenumero,
      max(cveaccion) as ultima
  FROM
           tblbitacoragf 
  WHERE
      cveusuario = 1
      
  GROUP BY
      cvenumero,
      cveano
      order by max(fechaaccion) desc
      )
  WHERE ROWNUM &lt;= 4 
  </code></pre>
  <p>I've tried doing</p>
  <p><code>INNER JOIN tblACCION ta USING (CVEACCION)</code></p>
  <p>and in SELECT</p>
  <p><code>ta.descripcion AS accion</code></p>
  <p>but I guess there's something wrong, because it always asks me for</p>
  <blockquote>
  <ol start="907">
  <li>00000 -  &quot;missing right parenthesis&quot;</li>
  </ol>
  </blockquote>
  <p>and I did check for parenthesis, but there's no lack of parenthesis.</p>
  <p><strong>UPDATE</strong></p>
  <p><a href="https://i.stack.imgur.com/ipDEx.png" rel="nofollow noreferrer">I've tried this 2.0 , nothing</a></p>