title: Hi i am working on a query which contains a group by clause. i will attach the table with data below. with previous and after scenarios
body: <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>stopid</th>
  <th>routeid</th>
  <th>delid</th>
  <th>arrivaldate</th>
  <th>departuredate</th>
  <th>stopNo</th>
  <th>noofitems</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>112</td>
  <td>22</td>
  <td>1234</td>
  <td>2022-10-04</td>
  <td>2022-10-05</td>
  <td>1.01</td>
  <td>1000</td>
  </tr>
  <tr>
  <td>232</td>
  <td>22</td>
  <td>2341</td>
  <td>2022-10-05</td>
  <td>2022-10-06</td>
  <td>1.00</td>
  <td>2000</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>i want a query to group by these 2 records in to one record like below</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>routeid</th>
  <th>arrivaldate</th>
  <th>departuredate</th>
  <th>noofitems</th>
  <th>stopNo</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>22</td>
  <td>2022-10-04</td>
  <td>2022-10-06</td>
  <td>3000</td>
  <td>1.00</td>
  </tr>
  </tbody>
  </table>
  </div>