summaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/yql-19192.yql
blob: 76cc78833dd02d20a82d16747c10431c0a49cba7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
$samples1 = AsList(<|sampl: 1|>,  <|sampl: 2|>);
$sampling_cumulative_prob1 = AsList(<|color: "blue", cum_prob: 3|>);

$cumulative_bounds = SELECT
    LAG(cum_prob) OVER () AS lower_cum_bound
FROM AS_TABLE($sampling_cumulative_prob1);

SELECT
    s.sampl,
    cb.lower_cum_bound
FROM AS_TABLE($samples1) AS s
CROSS JOIN $cumulative_bounds AS cb;