Created
April 30, 2024 16:51
-
-
Save lfy79001/fef99fe3761c9211908fc0e1f18fa138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH quantiles AS ( | |
SELECT APPROX_QUANTILES(LOG10(latency), 50) AS timearray | |
FROM `cloud-datalab-samples.httplogs.logs_20140615` | |
WHERE latency <> 0 | |
) | |
select row_number() over(order by time) as percentile, time from quantiles cross join unnest(quantiles.timearray) as time | |
order by percentile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment