is there a way to optimize this kind of query.
See the given below.
Select KPI.*,
(select sum(NP_2g_crfs) from kpi_table where date_upload = '14/01/2020') as num_sum,
(select sum(NP_2g_den) from kpi_table t1 where t1.id >= kpi_table .id) den_sum,
(select sum(NP_2g_num) from kpi_table t1 where t1.id >= kpi_table .id) num_sum,
(select sum(NP_2g_num) from kpi_table t1 where t1.id >= kpi_table .id) /
(select sum(ROUND(NP_2g_den, 2)) from kpi_table t1 where t1.id >= kpi_table .id) kpi
from kpi_table
WHERE date_upload = '14/01/2020'
Load time is up to 5 mins with 5000 rows.
Thanks in advance.