I have a schema that looks like this;
schema "things" do
field(:title, :string)
field(:temperature, :integer)
field(:weight, :integer)
end
I'd like to write an Ecto query that is equivalent to the following SQL, but I can't seem to get it into a valid form.
select * from things where temperature <= 200 and (weight is null or weight > 2);
How can I do this in Ecto?