Questions tagged [intervals]

Intervals are used to measure “distance” between values.

Intervals are used to measure “distance” between values.

In the DBMS world interval typically refers to the period between 2 timestamps, many modern RDBMS systems natively supports intervals and operation with them.

More information on the intervals can be found in the wild.

2903 questions
0
votes
1 answer

PostgreSQL INTERVAL period variable inside a loop

My goal is to calculate the latest seven days of the month within a loop in order to reference some foreign tables names but I'm getting syntax error on the bolded line (day_number_ts) and no idea how to handle it with a different approach. FOR…
VD_gen
  • 3
  • 2
0
votes
1 answer

Continuous functions in Isabelle

I want to define a continuous function on an interval of the real line -- [a,b), [a,b], (a,b), or (a,b] (where a < b and either could possibly be infinite) -- in Isabelle, or state that a function is continuous on such an interval. I believe what I…
Squirtle
  • 129
  • 8
0
votes
1 answer

Calculating the difference between two dates (including negative intervals) for dates 2 days or less from today's date in PHP 8.0

I am using the following code to change the status of an order in a woocommerce site when a given field 'ship_by_date_dont_edit' is within 2 (or less) days of today's date (via cron job). Everything works great, but I also need to account for…
0
votes
0 answers

greedy and optimal solution for maximum sub interval in certain range

I tried to get first a greedy solution for me handling reservation buy getting 2 days (start, end) and getting the maximum days that can be reserved without the interval being overlap #include #include using namespace…
kobi
  • 9
  • 1
0
votes
2 answers

In Google Sheets, how do I multiply a duration or interval constant?

I'm making calculations on production cost (in number of resources) and duration. I have a process that takes 5 minutes. Using the Duration format, I would enter that as 00:05:00. I want to queue up this process a certain number of times and…
0
votes
1 answer

Extend date intervals by two different IDs in R

I have a big data.frame where I can find a municipality id for each person(id) over time. Sometimes they move and there will be a new municipality_id from the next day on. However, sometimes the municipality_id stays the same. I would like to…
econ9595
  • 5
  • 2
0
votes
2 answers

Generating random INTERVAL

I have a function below that returns a random INTERVAL between a range of hours, which appears to be working fine but is currently limited to hours only. I would would like to expand this functionality to also support returning a random INTERVAL for…
Pugzly
  • 844
  • 3
  • 14
0
votes
0 answers

Date Year in the Past vbScript

I'm trying to find out why the below doesn't work. What I'm trying to do is if the TnCReviewDate is greater than a year in the past, then output a messagebox. I tried to use the DateDiff function to facilitate this, but it's not working. D2 is the…
0
votes
1 answer

Find the highest value locations within an interval and for a specific index?

Given this pandas dataframe with three columns, 'room_id', 'temperature' and 'State'. How do I get a forth column 'Max' indicating wehn the value is a maximum for each interval where State is True and for each room ? 117 1.489000 True …
Toinou
  • 13
  • 3
0
votes
1 answer

R:Sorting rows with time within multiple time interval

I want to pick up rows of which time data is between multiple intervals. The data frame is like this: dputs structure(list(ID = c("A", "A", "A", "A", "A", "B", "B", "B", "B", "B"), score_time = c("2022/09/01 9:00:00", "2022/09/02 18:00:00",…
KintensT
  • 7
  • 2
0
votes
0 answers

Pandas find limits/boarder of enclosed values given in two dataframes

Lets assume i have two dataframes (they are a result of tukeys outlier filter method fyi). The data is such, that df1 is either enclosed by df2, df2 >df1 or df2>df1. But df2 and df1 have no common values in any case. How do i check which case is…
NorrinRadd
  • 545
  • 6
  • 21
0
votes
1 answer

useEffect cleanup function never printing console log

Why isn't the console log in clean up function ever printed?? Even when I navigate away to another page it still isn't printed. The interval that was created also DOESN'T continue to run as I navigate to a different page even though I didnt clear…
Yeo Bryan
  • 331
  • 4
  • 24
0
votes
0 answers

Applying a distribution to data across time

I have data on trains departing a train station every day over a month. The data includes the departure time and the number of passengers travelling. I have a separate dataset which estimates, in 5 minute intervals, the percentage of passengers that…
digidrago
  • 1
  • 1
0
votes
3 answers

SparkSQL2.0 Query to count number of requests every 15 minutes within past hour

I'm trying to write a SQL query to count the number of requests received every 15 minutes within the past hour. I want to return the last three 15 minute intervals. My data looks like: log_date, time 2022-11-18, 2022-11-18 17:00:00 UTC 2022-11-18,…
recap
  • 5
  • 2
0
votes
0 answers

characteristics of a continuous distribution with R

I have a continuous distribution comming from a survey data and summarized in a table wth three columns wheres the first column X1 is the lower bound of the interval, X2 is the upper one and n is the size of each interval. enter image description…
1 2 3
99
100