2

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?

1 Answer 1

7

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
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.