From c3c0ec7a996d481ae46775a8914699592d11680b Mon Sep 17 00:00:00 2001 From: Konstantin Silin Date: Wed, 18 Dec 2024 10:16:05 +0100 Subject: [PATCH] Fix temporal join typo in 06_statettl.md * `SYSTEM_TIME` is expected * `$rowtime` is ambiguous - o.`$rowtime` works --- 06_statettl.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_statettl.md b/06_statettl.md index 67157af..964cb11 100644 --- a/06_statettl.md +++ b/06_statettl.md @@ -15,7 +15,7 @@ instead of a regular join. ```sql SELECT * FROM `examples`.`marketplace`.`orders` AS o - INNER JOIN `examples`.`marketplace`.`customers` FOR SYSTEM AS OF `$rowtime` AS c ON o.customer_id = c.customer_id + INNER JOIN `examples`.`marketplace`.`customers` FOR SYSTEM_TIME AS OF o.`$rowtime` AS c ON o.customer_id = c.customer_id ``` This changes the logic of the query. With a temporal table join, every order is enriched with the corresponding customer information as of the time when the order happened (`$rowtime`). There is one output row for each `order`. When a row