Blame | Last modification | View Log | Download | RSS feed
Clean up the computer uptime with something like this
create temporary table test like computer_uptime;
insert into test select
null,
device_id,
timestamp( date(last_reboot), sec_to_time(time_to_sec( last_reboot ) DIV 300 * 300) ),
min(added_date),
max(removed_date)
from
computer_uptime
group by
device_id,
timestamp( date(last_reboot), sec_to_time(time_to_sec( last_reboot ) DIV 300 * 300) );
delete from computer_uptime;
insert into computer_uptime select * from test;
drop table test;