0

I have uploaded a csv to a new install of apache superset, and I am querying it. So far it has been fine, but I am trying to use window functions, such as:

SELECT *, ROW_NUMBER() OVER( ORDER BY some_timestamp_utc) AS RowNumberRank
FROM StudentScore

and

select *, RANK() OVER(ORDER BY some_timestamp_utc) AS NoId
from StudentScore

These are not running (throwing an error saying near "(": syntax error. What is happening here and how can I use these window functions within superset on my uploaded CSV table?

TylerH
  • 20,799
  • 66
  • 75
  • 101
user1072337
  • 12,615
  • 37
  • 116
  • 195

1 Answers1

-2

If you are still having this issue, try putting your column names in doublequotes:

SELECT *, ROW_NUMBER() OVER( ORDER BY "some_timestamp_utc") AS "RowNumberRank"
FROM "StudentScore"

I've had similar issues with other SQL expressions, and the doublequotes solved my problem. I can't speak to the window function in particular, but this is worth a shot.

rea725
  • 1
  • 1