title: CloudWatch Logs Group By and getting last time value
body: <p><em>I need to map which endpoints are taking the longest from a log.</em></p>
  <p>I have a query that catches all the most discouraged endpoints, but they may have duplicate endpoints, but with different request times.</p>
  <p><strong>My query:</strong></p>
  <pre><code>fields request.url as URL, response.content.manager.company.label as Empresa, timestamp as Data, response.status as Status, request.time as TEMPO
  | filter @logStream = 'production'
  | sort request.time DESC
  | limit 30
  </code></pre>
  <p><strong>Result:</strong></p>
  <p># | <strong>ENDPOINT</strong> | <strong>TIMESTAMP</strong> | <strong>COMPANY</strong>  | <strong>STATUS CODE</strong> | <strong>TIME REQUEST</strong><br />
  1 | <strong>/api/v1/login</strong> | <strong>2020-02-01T11:14:00</strong> | company-label | 200 | 0.9876<br />
  2 | /api/v1/register | 2020-02-01T11:11:00 | company-label | 200 | 0.5687<br />
  3 | /api/v1/login | 2020-02-01T00:00:00 | company-label | 200 | 0.2345\</p>
  <p>I need to unify by endpoint, for <strong>example</strong>:<br />
  # | <strong>ENDPOINT</strong> | <strong>TIMESTAMP</strong> | <strong>COMPANY</strong>  | <strong>STATUS CODE</strong> | <strong>TIME REQUEST</strong><br />
  1 | <strong>/api/v1/login</strong> | <strong>2020-02-01T11:14:00</strong> | company-label | 200 | 0.9876<br />
  2 | /api/v1/register | 2020-02-01T11:11:00 | company-label | 200 | 0.5687\</p>
  <p>Unify by endpoint and get the last &quot;time&quot; to show</p>
  <p>Thank you!</p>