Попробуйте этот запрос:
SELECT
id,
groupArray(timestamp)[1] timestamp,
groupArray(properties.key)[1] property_key,
groupArray(properties.value) property_value
FROM (
SELECT
rowNumberInAllBlocks() as id,
timestamp,
properties.key,
properties.value
FROM test.test_011
WHERE timestamp BETWEEN toDateTime('2019-09-16 11:26:56') AND toDateTime('2019-09-26 11:26:56')
AND properties.value[indexOf(properties.key, 'found_items')] = '0'
ORDER BY timestamp)
ARRAY JOIN properties
WHERE properties.key IN ('query' /*, ..*/)
GROUP BY id, properties.key
ORDER BY id
/* Result
┌─id─┬───────────timestamp─┬─property_key─┬─property_value────────┐
│ 0 │ 2019-09-25 13:11:09 │ query │ ['pigeo'] │
│ 1 │ 2019-09-16 13:19:46 │ query │ ['panitos','pampers'] │
└────┴─────────────────────┴──────────────┴───────────────────────┘
*/
/* prepare test data */
CREATE TABLE test.test_011 (
timestamp DateTime,
properties Nested(key String, value String)
) ENGINE = Memory;
INSERT INTO test.test_011
VALUES
(toDateTime('2019-09-25 16:24:38'), ['query', 'found_items'], ['Palmera', '10']),
(toDateTime('2019-09-25 13:11:09'), ['query', 'found_items'], ['pigeo', '0']),
(toDateTime('2019-09-25 16:08:13'), ['query', 'found_items'], ['harmon', '17']),
(toDateTime('2019-09-16 13:19:46'), ['found_items', 'query', 'query'], ['0', 'panitos', 'pampers']),
(toDateTime('2019-09-25 16:22:38'), ['query', 'query'], ['test', 'test']);