blob: 6a582ffa763d6d6f670adf63c5e10bdc0f888e6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
PRAGMA DisableSimpleColumns;
PRAGMA DisablePullUpFlatMapOverJoin;
use plato;
pragma yt.JoinMergeTablesLimit="10";
pragma yt.JoinMergeUnsortedFactor="3.0";
INSERT INTO @inp2
SELECT * FROM Input2
ORDER BY BaseNo DESC;
COMMIT;
SELECT pd.BaseNo, m2.PhraseID, m2.Extra
FROM Input1 as pd
LEFT JOIN (select BaseNo, PhraseID, 1 as Extra from @inp2) as m2
USING (BaseNo, PhraseID)
ORDER BY pd.BaseNo, m2.PhraseID, m2.Extra;
|