-- *** before: ***
-- to see yesterday's row you had to query the shadow table
-- and pick the version by hand
SELECT Name, Population
FROM city_shadow
WHERE ID = 3068 AND valid_from <= DATE '2026-01-01'
AND valid_to > DATE '2026-01-01'
-- *** in version 2011: ***
SELECT Name, Population
FROM city_history
FOR SYSTEM_TIME AS OF TIMESTAMP '2026-01-01 00:00:00'
WHERE ID = 3068
-- Support: MS SQL Server 2016 and MariaDB 10.3 read history this way;
-- MS SQL Server adds FOR SYSTEM_TIME BETWEEN and CONTAINED IN. Oracle
-- reaches the same result with flashback: AS OF TIMESTAMP works there
-- since 9i, but only while the undo data lives. The other dialects have
-- no such clause.