One way would be to use a SELECT in a WHERE clause:
SELECT SUM(<column_that_you_want_to_sum>) FROM <your_table> WHERE (SELECT <column_that_you_want_to_select_on> > MAX(<field_that_you_want_to_compare_against>);
I would like to SELECT all 'time_elapse' WHERE time_type = 'Break' but only the rows that are after(below) the last(descendent) time_type = 'Start' and sum them up.
I know how to convert character varying to timestamp in order to sum them up, But I don't know how would be the syntax to select all possible 'Breaks' and sum them up (lets say the max Breaks between each 'Start' is nine).
I can hardly imagine a way to do that, so I would like to ask for suggestions.