Skip to content

Instantly share code, notes, and snippets.

@orcaman
Created June 26, 2019 20:20
Show Gist options
  • Save orcaman/406497f86d9c57d49af9b358bcd4ef1b to your computer and use it in GitHub Desktop.
Save orcaman/406497f86d9c57d49af9b358bcd4ef1b to your computer and use it in GitHub Desktop.
APPROX_QUANTILES
Threshold AS (
SELECT
ROUND(APPROX_QUANTILES(distance_from_closest_centroid,10000)[
OFFSET
(9500)],2) AS threshold
FROM
Distances)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment