Report optimized

This commit is contained in:
root 2022-09-13 12:52:33 +05:30
parent cfb71cd82d
commit 3216ec9d15
1 changed files with 2 additions and 2 deletions

View File

@ -458,8 +458,8 @@ invoice_data as (SELECT
0.0 AS profit_per
from invoice_date
left join pro_data on pro_data.pproject_id = invoice_date.project_id --and pro_data.employee_id = invoice_date.employee_id
left join drange_data1 on invoice_date.project_id = drange_data1.project_id and invoice_date.employee_id = drange_data1.employee_id
and invoice_date.date >= drange_data1.start_date and invoice_date.date <= drange_data1.end_date
--left join drange_data1 on invoice_date.project_id = drange_data1.project_id and invoice_date.employee_id = drange_data1.employee_id
--and invoice_date.date >= drange_data1.start_date and invoice_date.date <= drange_data1.end_date
),
res as (
select * from data1