blob: 33757e759c94187ac384d85509b62944fd3cdbd7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
/* syntax version 1 */
/* postgres can not */
$data = (SELECT cast(key as Uint32) ?? 0 as key, value FROM plato.Input);
$quant = 0.1;
SELECT
$quant * 100 as quantile,
PERCENTILE(key, $quant) as key_q,
COUNT(*) as count
FROM $data;
|