I'm writing a simple select query in hive. What i'm trying to do, is to filter by the value of the Nth (e.g. 5th) field, which I'm not sure what it's name will be, but I do know it's order.
Thanks!
I'm writing a simple select query in hive. What i'm trying to do, is to filter by the value of the Nth (e.g. 5th) field, which I'm not sure what it's name will be, but I do know it's order.
Thanks!
I have no knowledge of Hive, but as I understood from this answer, it would be somewhat similar to SQL Server.
SELECT field FROM
(SELECT
field,
row_number() OVER (PARTITION BY [your order clause]) as row
FROM table_name
Order by [your order clause])
WHERE row = 5