1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
PRAGMA DisableSimpleColumns; /* postgres can not */ USE plato; SELECT key, subkey FROM Input3 as ia INNER JOIN Input4 as ib USING(key) WHERE ib.subkey = '2' GROUP BY ia.key as key, ia.value as subkey ORDER BY key