Last active
January 19, 2022 10:11
-
-
Save sh16ma/5d39167ba5c734bbcdd606869c53f945 to your computer and use it in GitHub Desktop.
#๐ #BigQuery #่ฆ็ด็ตฑ่จ้
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
#standaardSQL | |
select | |
/********************************************** | |
* Google BigQueryใงใฎ่ฆ็ด็ตฑ่จ้ | |
**********************************************/ | |
count(passenger_count) as n | |
, avg(passenger_count) as mean | |
, stddev(passenger_count) as std | |
, min(passenger_count) as min | |
, (select q from(select percentile_cont(passenger_count, 0.25) over() as q from `project.dataset.table`) group by q) as first_quartile | |
, (select q from(select percentile_cont(passenger_count, 0.5) over() as q from `project.dataset.table`) group by q) as median | |
, (select q from(select percentile_cont(passenger_count, 0.75) over() as q from `project.dataset.table`) group by q) as thrd_quartile | |
, max(passenger_count) as max | |
from | |
`project.dataset.table` | |
where | |
passenger_count is not null | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment