Skip to content

Instantly share code, notes, and snippets.

@romain9292
Last active August 16, 2022 14:27
Show Gist options
  • Save romain9292/7a80b46787bfe9e8064a30dda9abc1e5 to your computer and use it in GitHub Desktop.
Save romain9292/7a80b46787bfe9e8064a30dda9abc1e5 to your computer and use it in GitHub Desktop.
[Numbering Functions - Row Number 5] Differences between numbering functions in BigQuery using SQL #SQL #BigQuery
SELECT
*,
ROUND(CUME_DIST() OVER(ORDER BY revenue),2)*100 AS cumulative_distribution,
FROM
`datastic.ranking.base_table`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment