mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-04 05:22:17 +00:00
9 lines
174 B
MySQL
9 lines
174 B
MySQL
|
SELECT k
|
||
|
FROM (
|
||
|
SELECT k, abs(v) AS _v
|
||
|
FROM remote('127.{1,2}', view(select materialize('foo') as k, -1 as v))
|
||
|
ORDER BY _v ASC
|
||
|
LIMIT 1 BY k
|
||
|
)
|
||
|
GROUP BY k;
|