I have code like this:
query = """
select from_user_id, to_user_id from account_relationships ar
where from_user_id =ANY($1)
and to_user_id =ANY($2)
and state in('avoid','block')
and inserted_at <= (now() - interval '$3 hours')
"""
results = Ecto.Adapters.SQL.query!(Repo, query, [player_ids, player_ids, minimum_time_hours])
The third parameter is a number. I get a postgres error.