我可以row_number() OVER()
通过计数行对结果进行编号吗?
例如
SELECT *,
users::numeric/population::numeric*100 AS penetration,
row_number() OVER(ORDER BY penetration DESC)
FROM states ORDER BY penetration DESC
产生错误:
ERROR: column "penetration" does not exist