select * from ( select dt, round(sum(c1) over(order by dt desc rows between current row and 6 following)/7,2), round(sum(c2) over(order by dt rows 6 preceding)/7,2) from ( select date(finish_time) dt, count(start_time) c1, count(finish_time)-count(start_time) c2 from tb_get_car_order where date(fini...