Hey @stef you can use CURRENT_TIMESTAMP
within a transaction, which will exactly match the system time of that transaction, e.g. see XTDB Play
You can then use that system timestamp to join across as many tables as needed to find all affected documents (rows) based on the xt$system_from
column. You can enumerate the tables using INFORMATION_SCHEMA
, e.g. SELECT * FROM INFORMATION_SCHEMA.TABLES