I want to write the following query in a phoenix application using Ecto fragments:
select * from ( select id, inserted_at + interval \'1 day\' * expiry a