use coalesce

This commit is contained in:
Austin 2024-07-31 21:11:27 -04:00
parent 4f280df0a5
commit c1bcb1e05c

View File

@ -19,7 +19,7 @@ FROM
WHERE
TO_TIMESTAMP_NTZ(_inserted_timestamp) >= (
SELECT
MAX(_inserted_timestamp)
COALESCE(MAX(_inserted_timestamp), '1970-01-01' :: TIMESTAMP) _inserted_timestamp
FROM
{{ this }}
)