mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 18:12:02 +00:00
3 lines
344 B
MySQL
3 lines
344 B
MySQL
|
SELECT topKWeighted(2)(x, weight), topK(2)(x) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([('hello', 1), ('world', 1), ('goodbye', 1), ('abc', 1)]) AS t));
|
||
|
SELECT topKWeighted(2)(x, weight), topK(2)(x) FROM (SELECT t.1 AS x, t.2 AS weight FROM (SELECT arrayJoin([('hello', 1), ('world', 1), ('goodbye', 2), ('abc', 1)]) AS t));
|