blob: 4176ad60aa41011f92caab9bcbd0877798a83ed3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
USE plato;
pragma AnsiOptionalAs;
pragma yt.CompactForDistinct;
$x = (
SELECT key, AVG(DISTINCT Cast(subkey as float)) s FROM InputB GROUP BY key
);
$y = (
SELECT key, SUM(Cast(subkey as float)) s FROM InputC GROUP BY key
);
SELECT x.key, x.s AS s1, y.s AS s2 FROM $x x FULL OUTER JOIN $y y ON x.key = y.key;
|