I’m trying to make this kind of thing work in ksqlDB query:
address, balance, change_id
a1,1,first -> a1,1,first
null,null,second -> a1,1,second
a1,2,third -> a1,2,third
null,null,fourth -> a1,2,fourth
In “descriptive SQL” terms:
SELECT
topic.address,
topic.balance,
(SELECT LATEST(topic.change_id) FROM topic WHERE topic.address IS NULL) AS change_id
FROM topic
WITHIN 1 MINUTE
WHERE topic.address IS NOT NULL
Is something like this possible? Note that there’s no group key, as the latest entry is just that, the latest entry not tied to specific addresses here.