The SQL:2011 syntax puts the temporal filters directly after base table reference (and before the table alias) [0]
i.e. it would be `SELECT * FROM orders FOR SYSTEM_TIME AS OF "@seq:1000" WHERE customer_id="cust1"` rather than `SELECT * FROM orders WHERE customer_id="cust1" AS OF "@seq:1000"` (the latter being an example from the DriftDB readme)
Yes, but that’s just time traveling, IIRC. With actual time travel queries you can see what changed between T1 and T2, like “show me all users that changed their email address last month” or “of the products that changed prices, how much did they change by” etc.
You can build all of that on top of simple time travel, but there was a lot of research on how to bake it into the SQL language. IIRC, a lot of it was proposed for the SQL standard but it was too niche or something. It’s been over half a decade since I was in that space.
i.e. it would be `SELECT * FROM orders FOR SYSTEM_TIME AS OF "@seq:1000" WHERE customer_id="cust1"` rather than `SELECT * FROM orders WHERE customer_id="cust1" AS OF "@seq:1000"` (the latter being an example from the DriftDB readme)
[0] https://docs.xtdb.com/reference/main/sql/queries.html#_tempo...