You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WITH RECURSIVE cte AS (
SELECTmy_app_thing.id,
ROW_NUMBER() OVER () AS row_number
FROM my_app_thing
)
SELECT*FROM (
WITH RECURSIVE cte AS (
SELECTmy_app_thing.id,
ROW_NUMBER() OVER () AS row_number
FROM my_app_thing
)
SELECTcte.idAS col1,
cte.row_numberAS row_number,
ROW_NUMBER() OVER (ORDER BYcte.row_number) AS row_number2
FROM cte
) qualify
WHERE row_number2 =1
While it should be something like this:
WITH RECURSIVE cte AS (
SELECTmy_app_thing.id,
ROW_NUMBER() OVER () AS row_number
FROM my_app_thing
)
SELECT*FROM (
SELECTcte.idAS col1,
cte.row_numberAS row_number,
ROW_NUMBER() OVER (ORDER BYcte.row_number) AS row_number2
FROM cte
) qualify
WHERE row_number2 =1
The text was updated successfully, but these errors were encountered:
Given this CTE query:
The generated SQL looks like this:
While it should be something like this:
The text was updated successfully, but these errors were encountered: