Convert Teradata qualify row_number() to Google BigQuery

How can I translate this query into Big query?

\n\n
select subsequent_month from dbc.tables \nqualify row_number() over (order by tablename) <= 24\n
\n\n

There is no QUALIFY command in Bigquery.

Below is for BigQuery Standard SQL equivalent:

\n\n \n\n
#standardSQL\nSELECT subsequent_month FROM (\n      SELECT subsequent_month, ROW_NUMBER() OVER (ORDER BY tablename) as RN\n      FROM dbc.tables \n) WHERE RN <= 24

Ryan-Dallas

posted on

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds