From 2a6f164d4d7cdd47d06e6f6ee9248c44ca70dca2 Mon Sep 17 00:00:00 2001 From: Rodolfo Date: Sat, 7 Dec 2024 09:43:35 -0300 Subject: [PATCH] query fix --- src/main/resources/ddl/2-append_events.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/ddl/2-append_events.sql b/src/main/resources/ddl/2-append_events.sql index 3177c1d..5e3964c 100644 --- a/src/main/resources/ddl/2-append_events.sql +++ b/src/main/resources/ddl/2-append_events.sql @@ -21,7 +21,7 @@ BEGIN SELECT ARRAY(SELECT UNNEST(_domain_ids) ORDER BY 1) INTO _domain_ids; -- Fetch the row with the max sequence number from the events table - SELECT * + SELECT e.sequence_id, e.correlation_id INTO previousEventRow FROM events e WHERE e.sequence_id = (SELECT max(e2.sequence_id)