blob: 757c9d55ccc914c9ffe3611a6acb79f56add71b4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
USE plato;
pragma AnsiOptionalAs;
$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;
|