DK
SELECT id, ctr FROM …..
возращается результат
id | ctr |
1 | 1.2
2 | 1.4
3 | 1.1
Есть ли техническая возможность вывести разнизу CTR с первой записью где id=1 ? БЕЗ with ? Не хочется деллать еще раз запрос и плодить полотно
Size: a a a
DK
DN
PL
select first_id, first_ctr, arrayJoin( agg ) as nest, nest.1 as id, nest.2 as ctr
from (
select min(id) as first_id, argMax(ctr, id) as first_ctr, groupArray(tuple(id,ctr)) as agg
from (
select `number` as id, 1 + mod(rand(), 100) / 100 as ctr from numbers(10) order by id
)
)
AM
DC
20.8.9.6
, в которой, по идее, должны были решить проблему с разваливающимеся индексами. До этого стояла версия 19.13.6
.DB::Exception: Bad size of marks file '/var/lib/clickhouse/data/db/locatable_entity_states/202007_0_95577_29252_132669/skp_idx_loc_campus_id_idx.mrk2': 144, must be: 168
ИИ
minmax GRANULARITY 3
DC
minmax GRANULARITY 3
DC
ИИ
AR
D
AR
AR
AR
PL
AR
AR
AM
SELECT user, countDistinct(article) as count from (SELECT article, arrayJoin(arraySlice(arraySort((x,y)->y, groupArray(user),groupArray(toUnixTimestamp(time))),1,10)) as user from db WHERE status='read' group by article) group by user order by count desc limit 25
AP
SELECT user, countDistinct(article) as count from (SELECT article, arrayJoin(arraySlice(arraySort((x,y)->y, groupArray(user),groupArray(toUnixTimestamp(time))),1,10)) as user from db WHERE status='read' group by article) group by user order by count desc limit 25
DC
SELECT user, countDistinct(article) as count from (SELECT article, arrayJoin(arraySlice(arraySort((x,y)->y, groupArray(user),groupArray(toUnixTimestamp(time))),1,10)) as user from db WHERE status='read' group by article) group by user order by count desc limit 25