Reputation: 66921
I have the following sql:
create table gps (laf int, "timestamp" timestamp);
select * from
(select *, row_number() over() from gps) as yo
where row_number == 10
But it yields this response:
ERROR: operator does not exist: bigint == integer Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. Position: 84
typecasting does not seem to help. How do I compare row_number (a bigint) with a number?
Upvotes: 2
Views: 4379
Reputation: 66921
Seems I'm stuck in programming land, I needed =
instead of ==
, but posting here for posterity, and google:
select * from
(select *, row_number() over() from gps) as yo
where row_number = 0
Upvotes: 7