I'm trying to Simulate a Timeline using a MySQL Query based on the following table structure just an example

```
drop table if exists testing;
create table testing (
   idno integer not null auto_increment,
   date datetime not null,
   primary key (idno)
);

insert into testing values
(default, '2019-08-25'),
(default, '2019-09-01'),
(default, '2019-09-05'),
(default, '2019-09-10'),
(default, '2019-09-15'),
(default, '2019-09-20');

```

What I'm trying to accomplish is retrieving the rows starting from where a given date falls between both dates

For example I can do the following

```
select * from testing
where date >= (
   select date from testing
   where date <= '2019-09-09 00:00:00' 
   order by date desc limit 1 
)
order by date;

```

Which return all the dates from 2019-09-05 and upward, but if I use

```
select * from testing
where date >= (
   select date from testing
   where date <= '2019-09-10 00:00:00' 
   order by date desc limit 1 
)
order by date;

```

Then it will return all the dates from 2019-09-10 and upward, with this date being the new cutoff (which is what I want)

The issue is that it only works when at least one cutoff date has been reached so if I query it with this

```
select * from testing
where date >= (
   select date from testing
   where date <= '2019-08-24 00:00:00' 
   order by date desc limit 1 
)
order by date;

```

It returns nothing because the subquery is trying to do where date >= nothing, I worked around it by changing the query to cater for this but now it is just a big fat mess

```
select * from testing
where (
   date >= (
      select date from testing
      where date <= '2019-08-24 00:00:00' 
      order by date desc limit 1
   ) or not exists (
      select date from testing
      where date <= '2019-08-24 00:00:00' 
      order by date desc limit 1
   )
)
order by date;

```

Is there a cleaner way of achieving such a thing? This way feels very clumsy