select * from dim_contracts where '2023-01-01 00:00:01' between valid_from and valid_to