Question : I have a table named “TOOLS” . Sample data: ID TAG 1 0 2 1 3 1 4 […]
Tag: gaps-and-islands
Find which numbers in [1, 161] are not in the result set?
Question : How to find which two number in [1, 161] is not in the result set? Can I find […]
Gaps and islands with GPS breadcrumb data
Question : I’ve got a gaps and islands (GAI) problem that I can’t seem to crack to save my life. […]
How to check if logs has 7 consecutive days?
Question : Objective Below is the example data format. I need to get the in day 1, 2, 3, and […]
How to group records by a two-value column ignoring small gaps?
Question : I have a subquery with a column named code that only has 1 and 0 values and an […]
Possible to GROUP BY across different columns in mariadb/mysql
Question : I have a table full of events similar to this: `date` | start_time | end_time | length ——————————————– […]
Count of 3 consecutive unsynced dates
Question : I have a table set out like so: user_id the_date minutes_asleep —————————- 1 2015-01-01 480 1 2015-01-02 0 […]
how to generate a sequence of values with differents formats in PostgreSQL
Question : I want to find rows missing from a sequence of values in my table with differents formats. For […]
Calculate Difference in Overlapping Time in PostgreSQL / SSRS
Question : I’m using PostgreSQL 9.2 and SSRS 3.0. I’m trying to calculate the difference in non-overlapping time entries in […]
How to find values missing from a sequence?
Question : I want to find rows missing from a sequence of values in my table. For example, in this […]