Grouping data into 5 minute intervals within a time range
This is a very basic implementation of a calendar table. As you cans see, it simply group dates using intervals.

drop table if exists calendar;
drop table if exists intrv;

create table calendar(id int, dt timestamp);

insert into calendar values 
(1, '2017-11-12 19:10:00'), 
(1, '2017-11-12 19:15:00'),
(1, '2017-11-12 19:20:00'),
(1, '2017-11-12 19:25:00'),
(1, '2017-11-12 19:30:00');

create table intrv (Rate decimal(18,6), Dt timestamp);

insert into intrv values
(0.001111, '2017-11-12 19:13:05'),
(0.001214, '2017-11-12 19:14:11'),
(0.001612, '2017-11-12 19:15:42'),
(0.001231, '2017-11-12 19:16:23'),
(0.001514, '2017-11-12 19:17:23'),
(0.001611, '2017-11-12 19:26:33'),
(0.001421, '2017-11-12 19:27:25'),
(0.001214, '2017-11-12 19:28:27'),
(0.001611, '2017-11-12 19:29:55');

select    c.dt as dt1,
          sum(i.Rate) 
from      calendar c
left join intrv i
on        i.dt &gt;= c.dt 
and       i.dt &lt; date_add(c.dt, interval 5 minute)
group by  c.dt;



| dt1                 | rate     |
|---------------------|----------|
| 12.11.2017 19:10:00 | 0,002325 |
| 12.11.2017 19:15:00 | 0,004357 |
| 12.11.2017 19:20:00 | NULL     |
| 12.11.2017 19:25:00 | 0,005857 |
| 12.11.2017 19:30:00 | NULL     |


rextester here

For the second part of the question, you should explain how to auto-generate the desired values.