title: DB2 SQL group row count by time intervals of 10 minutes
body: <p>I have a table in DB2 which contains data such as the following:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>completed_timestamp</th>
  <th>details</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2021-12-19-15.38.10</td>
  <td>abcd</td>
  </tr>
  <tr>
  <td>2021-12-19-15.39.10</td>
  <td>efgh</td>
  </tr>
  <tr>
  <td>2021-12-19-15.48.10</td>
  <td>ijkl</td>
  </tr>
  <tr>
  <td>2021-12-19-15.49.10</td>
  <td>mnop</td>
  </tr>
  <tr>
  <td>2021-12-19-15.54.10</td>
  <td>qrst</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I want to be able to count the number of rows in the table for every 10 minutes e.g.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Time</th>
  <th>count</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2021-12-19-15.40</td>
  <td>2</td>
  </tr>
  <tr>
  <td>2021-12-19-15.50</td>
  <td>2</td>
  </tr>
  <tr>
  <td>2021-12-19-16.00</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>completed_timestamp = Timestamp, details = varchar</p>
  <p>I've seen this done in other SQL languages but so far have not figured out how to do it with DB2. How would I do that?</p>