Currently I have a interval column after subtracting two timestamp without time zone columns
SELECT started_at - ended_at AS ride_length
FROM [dbo]
However, I am getting negative values for the intervals and I want to filter them out.
I tried:
SELECT *
FROM [dbo]
WHERE ride_length < 0
and it returns this error
HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
But I cannot change the datatype of the column.
New contributor
dwoong is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.