Skip to content

Instantly share code, notes, and snippets.

@romain9292
Created August 16, 2022 15:25
Show Gist options
  • Save romain9292/a8d5485aa7600cb76fd4f7575a5551de to your computer and use it in GitHub Desktop.
Save romain9292/a8d5485aa7600cb76fd4f7575a5551de to your computer and use it in GitHub Desktop.
[Numbering Functions - Row Number 6] Differences between numbering functions in BigQuery using SQL #SQL #BigQuery
SELECT
*,
NTILE(4) OVER(ORDER BY revenue) AS quartiles,
FROM
`datastic.ranking.base_table`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment