refers to gaps (zero, undefined or nonexistent elements) in data structures and sequences.
Questions tagged [gaps-in-data]
75 questions
0
votes
2 answers
Delete data with gaps
I want to delete data with gaps between the max and min time period corresponding to an individual id. Each Id can start and end in any time period, that is fine. I just want to grab ids that do not have missing time within the max and min time.…

user_n
- 53
- 7
0
votes
3 answers
how to select the rows with id's just one above gaps
I have a table containing columns id and name. My focus is on order of id. In fact I want to select the rows, When order of number's id breaks . Look at my example:
// mytable
+----+-----------+
| id | name |
+----+-----------+
| 1 | ali …
user4920811
0
votes
3 answers
Postgresql Fill Gaps - Matrix of latest available information for a given branch
I have a table with indexes of imported files, with dates and branches of each imported files.
Now I need to do a consolidation of multiple branches, so, that I have to duplicate the information from some branches when we have holidays, so that the…
0
votes
2 answers
SQL report to show gaps between record entries
I wrote an application where the usage of a number of vehicles is recorded as seen in the screenshot.
I'd like to generate a report for gaps (in miles) between individual usages because the vehicles should not be used other than for travel that is…

John
- 341
- 1
- 6
- 13
0
votes
1 answer
SQL query to find Start & End of Ranges in a column having gaps
i have a table in Access which has an SKU column and its Sales column. The Sales Column has gaps i.e. blanks or zeroes that are >=3. The zeroes are to be considered as blanks and should be blanked out. A Gap will be considered as >=3 Blanks or…

sifar
- 1,086
- 1
- 17
- 43
0
votes
1 answer
AWK gaps between cells
I have a problem, please could you help me?
I have the .txt file I use the awk code to separate columns using the tab delimited function.
I receive the align columns, but if some information missing, the whole row turn left and information are …

Vonton
- 2,872
- 4
- 20
- 27
0
votes
1 answer
How to pivot two date columns and fill in the gaps with multiple overlapping date periods
I have a table with employee absence entries. The rows contain employee number, first and last day of absence and a whole lot of more data like absence type, approved, etc.
absencecalendarline:
EMPLOYEENUMBER | FIRSTDAYOFABSENCE | LASTDAYOFABSENCE…

Alexander
- 3
- 2
0
votes
3 answers
Transform to Linq (overlap validations)
I Have a Tuple list and I want to find overlaps:
static bool Overlap(params Tuple[] ranges) {
for (int i = 0; i < ranges.Length; i++) {
if (i + 1 < ranges.Length) {
if (!(ranges[i].Item1 < ranges[i].Item2
…

Bruno
- 438
- 1
- 5
- 13
0
votes
2 answers
Fill the gaps of NULL-s in a table with average values
I have a table with fields (id,letter,date) and some data in it:
1 A 2012-01-01
2 B NULL
3 C NULL
4 D 2012-01-15
I want to fill the NULL values with an average date of nearest non-NULL values. Like that:
1 A 2012-01-01
2 B 2012-01-08
3 C…

No Way
- 183
- 9
-1
votes
1 answer
Find a chain that fill range without gaps
Given a range f.e. :
range : 1 4
there are 3 lists of pairs that 'fill' this range w/o gaps. Call it a 'chain'
chain1: 1 2, 2 3, 3 4
chain2: 1 2, 2 4
chain3: 1 3, 3 4
the following lists of pairs fail to fill the range, so it is not a chain :
1 2 …

sten
- 7,028
- 9
- 41
- 63
-1
votes
2 answers
Fill missing rows based on index number gaps, why does it work? - pandas series
So say i have a pandas series, as:
s = pd.Series([1,2],index=[0,3])
0 1
3 2
dtype: int64
And there's a gap between 0 and 3 in the index, so what i want is to add more rows to fill up the gaps to get the index of [0, 1, 2, 3].
So desired…

U13-Forward
- 69,221
- 14
- 89
- 114
-1
votes
1 answer
Find Gap in Dates SQL
I'm using Microsoft SQL Server and have 2 tables, AbsenceHistory and FITNoteHistory.
AbsenceHistory:
[Employee Number], [Absence Number], [Start Date], [End Date]
FITNoteHistory:
[Absence Number], [FIT Note Number], [Start Date], [End Date]
I…

Wyatt Matthews
- 1
- 1
-2
votes
1 answer
T-SQL Trigger or Constraint for Gaps in Intervals
I have a table of identifiers, IntervalFrom and IntervalTo:
Identifier
IntervalFrom
IntervalTo
1
0
2
1
2
4
2
0
2
2
2
4
I already have a trigger to NOT allow the intervals to overlap.
I am looking for a trigger or constraint that…

Quentin
- 21
- 3
-2
votes
3 answers
Given a sequence of numbers how to identify the missing numbers
I would like to get all missing numbers in a sequence of numbers.
Just wondering if there is a better approach than below?
SELECT x
FROM
(
SELECT x,
LAG(x,1) OVER ( ORDER BY x ) prev_x
FROM
( SELECT * FROM
(…

Teja
- 13,214
- 36
- 93
- 155
-3
votes
1 answer
php find gaps and build an array
I have this
array
(
[0] => 1976,
[1] => 1977,
[2] => 1978,
[3] => 1979,
[4] => 1980,
[5] => 1981,
[6] => 1982,
[7] => 1983,
[8] => 1990,
[9] => 1991,
[10]…

Jelqui
- 11
- 2