MySQL: a timespan available within consecutive times -
I have a table which is the constant time and date for an agenda.
As you can see that 05-02-15 time is constant from 19:00 to 1940
as you go to 06-02-15 You can see from time to time 19:00 to 19:15 continuously
As you can see on 06-02-15, from 19:25 to 1940 If the constant is
start time and end time is always a difference of 5 minutes.
I have to make all the dates, which are continuously x So when x = 30 , the result is:
05-02-15 when X = 10 , the result is:
05-02-15 06-02-15 Ideas for an approach
maybe the first step is to continuously calculate the number of records is to get all the parts, the second part (when x = 30, we need at least 30 minutes / 5 minutes = 6).
This query checks that you have @ x / 5 next @ X Free slots in minutes and if so, covering their entire @x minute interval means they are consistent.
set @ x = 15; T1 DTAT and T2BGAT = T1 DOT and T2BBG & gt; from the agenda_specialists` as joining T1. = T 1.bizen and T.bizen & lt; Aedtaim (T Lkbigin, Sekand_to_taim 60)) x @ count (*) = by t1.id Group / 5
Comments
Post a Comment