I have a dataset with a data that is formatted like this:
Date | exec_time
------------+---------
Today | 99999 ms
Yesterday | 1 ms
Tomorrow | 50000 ms
Another Day | None Recorded
Last Day | ms
What I need to do is write a query to get all of the exec_time
values that are >= 60000
The way I've tried to write it is like this:
select exec_time
from myTable
where exec_time not like '%N%'
and cast(split_part(exec_time,' ', 1) as int) >= 60000
order by len(exec_time) desc, exec_time desc
limit 10
However, when I run this, I get this error:
ERROR: Invalid digit, Value '2', Pos 0, Type: Integer
Detail:
-----------------------------------------------
error: Invalid digit, Value '2', Pos 0, Type: Integer
code: 1207
context:
query: 2780081
location: :0
process: query0_61 [pid=0]
-----------------------------------------------
Any ideas how I can get around this?