Skip to content Skip to sidebar Skip to footer
Showing posts with the label Gaps And Islands

Using Inner Join To Determine The Interval Between Specific Records And Related Events In A Table

I have a simple table that is used to record events against specific visits: Describe Histories; … Read more Using Inner Join To Determine The Interval Between Specific Records And Related Events In A Table

Sql Or Linq: How Do I Select Records Where Only One Paramater Changes?

Say we have this list: Id IdRef myColumn anotherColumn 448 70 1 228 449 … Read more Sql Or Linq: How Do I Select Records Where Only One Paramater Changes?

Enumerating Table Partitions In Postgres Table

Suppose I have a table like this: id | part | value ----+-------+------- 1 | 0 | 8 2 | 0 … Read more Enumerating Table Partitions In Postgres Table

Tracking A Continuous Instance Of Absence Sql

I have a table called sickness which is a record of when an employee is off work sick. It looks lik… Read more Tracking A Continuous Instance Of Absence Sql

Sql Server 2014 Merging Overlapping Date Ranges

I have a table with 200.000 rows in a SQL Server 2014 database looking like this: CREATE TABLE Date… Read more Sql Server 2014 Merging Overlapping Date Ranges

Sum Two Rows And Order By Date / Total

need some help to build a query, this is my current scheme: users: +----+------------+ | id | user… Read more Sum Two Rows And Order By Date / Total

Group Consecutive Time Intervals In Sql

Assuming a data structure of the type stock_name, action, start_date, end_date google, growing, 1, … Read more Group Consecutive Time Intervals In Sql

Sql Query To Return Nil For Dates Not Present In The Table

I have a table 'my_table'. It has the following data : ID --- Date 1 --- 0… Read more Sql Query To Return Nil For Dates Not Present In The Table