You have a table with two columns: Target date and Completion date. You need to compare and rate these dates:
Enter the following SQL query:
SELECT *, CASE WHEN (('Completion date' - 'Target date') / "24h") < 5 THEN "ON TIME" WHEN (('Completion date' - 'Target date') / "24h") > 5 AND (('Completion date' - 'Target date') / "24h") <= 10 THEN "LATE" ELSE "VERY LATE" END AS 'Rating' FROM T1 |
You can use FORMATWIKI function to insert statuses into a table. |
![]() |