This file contains hidden or 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
import inspect | |
import json | |
import logging | |
import os | |
import re | |
import sys | |
import subprocess | |
import threading | |
from urllib import request | |
import socket |
This file contains hidden or 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
This will return the percentiles in order. | |
-- #1 | |
select unnest( | |
percentile_cont( | |
(select array_agg(s) from generate_series(0, 1, 0.2) as s) | |
) WITHIN GROUP (ORDER BY SIZE)) | |
from mytable |