DB lookup block
All checks were successful
Build and Push Docker Image / setup (push) Successful in 4s
Build and Push Docker Image / build_and_push (push) Successful in 31s

This commit is contained in:
admin user 2025-05-05 10:39:44 +00:00
parent 9addd59605
commit e19f1562af

View File

@ -1,6 +1,5 @@
WITH abc AS (
SELECT
DISTINCT
SELECT DISTINCT ON (app.application_key)
app.application_key,
CAST(app.application_timestamp AS TIMESTAMP) AS application_timestamp,
LOWER(app.application_email_address) AS application_email_address,
@ -14,7 +13,9 @@ WITH abc AS (
ON app.application_key = master.application_key
LEFT JOIN public.originated_loan AS loans
ON master.originated_loan_key = loans.originated_loan_key
-- WHERE app.application_customer_type = 'Direct New'
WHERE app.application_key = $application_key
OR app.application_key = ANY(ARRAY$connected_application_keys::text[])
ORDER BY app.application_key, app.application_timestamp DESC
),
current_app AS (