Hi @Rizal Valry ,
What are the data types of both dump_trx.execute_date and file_scan.waktu_scan columns?
If both of them are date or datetime, you could refer below:
SELECT DATEDIFF(DAY,dump_trx.execute_date,file_scan.waktu_scan) AS SLA
FROM vm.dump_trx left join vm.file_scan on dump_trx.id=file_scan.id
In addition, I analyzed the data of your two tables, the join condition could be below which is better.
FROM vm.dump_trx left join vm.file_scan on dump_trx.id_file=file_scan.id
You could check which one is better according to your own condition.
Best regards,
Melissa