title: Return the last row from the duplicate rows
body: <p>How can I get only the unique rows based on comparison between three columns in the table.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">id</th>
  <th style="text-align: center;">date</th>
  <th style="text-align: right;">location</th>
  <th style="text-align: right;">value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 2</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">4</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">2022-09-06 13:10</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">2</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">2022-09-06 13:10</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">5</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">2022-09-06 13:10</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">6</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>After checking the column &quot;ID&quot;, &quot;DATE&quot;, and &quot;Location&quot; we can see the only id = 3 has three rows with same value in three columns so I will keep only the last row from.</p>
  <p>Expected table:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">id</th>
  <th style="text-align: center;">date</th>
  <th style="text-align: right;">location</th>
  <th style="text-align: right;">value</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">1</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 2</td>
  <td style="text-align: right;">1</td>
  </tr>
  <tr>
  <td style="text-align: left;">2</td>
  <td style="text-align: center;">2022-09-06 13:09</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">4</td>
  </tr>
  <tr>
  <td style="text-align: left;">3</td>
  <td style="text-align: center;">2022-09-06 13:10</td>
  <td style="text-align: right;">point 1</td>
  <td style="text-align: right;">6</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I have tried using this query but it doesn't return the expected results</p>
  <pre><code>SELECT *
  FROM my table
  QUALIFY ROW_NUMBER() OVER (PARTITION BY ID, DATE,LOCATION ORDER BY ID, DATE) = 1
  order by ID, DATE;
  </code></pre>