Suppose I have this table from the result of a select * from journeys:
timestamp     | inJourney (1 = true and 0 = false)
--------------------------------------------------
time1         | 1
time2         | 1
time3         | 1
time4         | 0
time5         | 0
time6         | 1
time7         | 1
time8         | 1
Expected:
timestamp     | inJourney (1 = true and 0 = false)
--------------------------------------------------
time1         | 1
time4         | 0
time8         | 1
Note: the timestamp is not important because I only want to count the number of journeys.
Any idea what I have to do?
 
     
     
    