title: SQLITE query to desire results
body: <p>I have the table in the format (CUSTOMER)     (FIG 1.1)                                                       </p>
  
  <pre><code>M_CODE  H_CODE END_TIME_OF_SERVICE ADULT ADULT_F
  TKLK    LONE     09:19:16           1     2
  TKLK    LONE     09:22:11           4     6
  TKLK    LONE     09:32:46           2     7
  TKLK    LONE     09:32:46           4     9
  TKLK    LONE     10:09:36           1     3
  </code></pre>
  
  <p>and if i run the ( SELECT strftime('%H:%M', end, '-9 minutes') || ' - ' || strftime('%H:%M', end ) AS time_slot FROM end_times ) it gives the correct output as (FIG - 1.2)</p>
  
  <pre><code>09:19 - 09:28
  09:29 - 09:38
  09:39 - 09:48
  09:49 - 09:58
  09:59 - 10:08
  10:09 - 10:18 
  </code></pre>
  
  <p>Can you guide how to map these two tables, let`s say the the records in CUSTOMER table should be summed up for adult and adult_f column with( FIG 1.2 to FIG 1.1 )</p>
  
  <pre><code>   ADULT    ADULT_F    TIME_SLOT
        5        8      09:19 - 09:28
        6       16      09:29 - 09:38
        0        0      09:39 - 09:48
        0        0      09:49 - 09:58
        0        0      09:59 - 10:08
        1        3      10:09 - 10:18 
  </code></pre>
  
  <p>Kindly guide me a solution, thanks for your time.</p>