Min and Max values grouping by consecutive ranges
问题 I have a table that informs me a error type and line number that error occurred. (The process is irrelevant at this moment). I need to group by error type and show line start and line end for each error type, resulting of a range of each error type. I need to consider gaps of lines My table and queries was: create table errors ( err_type varchar(10), line integer); insert into errors values ('type_A', 1),('type_A', 2),('type_A', 3), ('type_A', 6),('type_A', 7), ('type_B', 9),('type_B', 10), (