title: Groupby on custom column and time with SQL
body: <p>I have a following dataset:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>collection_time</th>
  <th>col_a</th>
  <th>col_b</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2022-06-27 14:15</td>
  <td>20</td>
  <td>15</td>
  </tr>
  <tr>
  <td>2022-06-27 14:13</td>
  <td>-1</td>
  <td>-1</td>
  </tr>
  <tr>
  <td>2022-06-26 20:15</td>
  <td>21</td>
  <td>47</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to have the following output:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>collection_time</th>
  <th>count_negatives</th>
  <th>count_positives</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>2022-06-27</td>
  <td>1</td>
  <td>1</td>
  </tr>
  <tr>
  <td>2022-06-26</td>
  <td>0</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I was trying to use <code>CASE WHEN expr THEN val ELSE val END</code> syntax, combined with <code>GROUP BY collection_time, count_negatives, count_posivites</code> but I haven't had any luck so far.</p>
  <p>It's difficult for me to even share any sort of queries as nothing gives me any sort of useful results.
  Can anybody help me out a little bit with that?</p>