Skip to content

Instantly share code, notes, and snippets.

@romain9292
Created September 2, 2022 17:11
Show Gist options
  • Save romain9292/56c2d7ede39600707a3be180ee63d656 to your computer and use it in GitHub Desktop.
Save romain9292/56c2d7ede39600707a3be180ee63d656 to your computer and use it in GitHub Desktop.
[Numbering Functions - Row Number 7] Differences between numbering functions in BigQuery using SQL #SQL #BigQuery
SELECT
*,
ROUND(PERCENT_RANK() OVER(ORDER BY revenue)*100,2) AS pct_rank,
FROM
`datastic.ranking.base_table`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment