Questions tagged [clickhouse-go]
21 questions
0
votes
1 answer
Postgres query convert to clickhouse with conditional count
I need to convert this postgres query to clickhouse:
select count(1) filter (where car_model = 'chevrolet'), count(distinct car_num) filter (where car_model='chevrolet') from cars;
I have tried with countIf, but it does not accept the condition. so…

Husan Musa
- 11
0
votes
0 answers
Making sure table/materialized view created before continuing next command on Clickhouse
I'm using clickhouse-go, sometimes when I run create multiple materialized view, then query from those materialized view it shows success, but sometimes failed because the materialized view not yet created (table default.the_mv_name doesn't…

Kokizzu
- 24,974
- 37
- 137
- 233
0
votes
0 answers
clickhouse gives "create user" as syntax error
I have enabled access_management also but when I try show users or create user this is how I'm getting.
3e6af090665c :) show users;
Syntax error: failed at position 6:
show users;
Expected one of: CREATE, TABLES, DICTIONARIES, PROCESSLIST
Please…

Mammu yedukondalu
- 136
- 2
- 14
0
votes
0 answers
Clickhouse DB: ReplacingMergeTree ver column is not affected
This is my table's create script
CREATE TABLE IF NOT EXISTS replacing_test (
addr String,
ver UInt64,
stt String,
time DateTime,
)…

zukito
- 1
0
votes
0 answers
Clickhouse downsample into OHLC different time bar intervals
How would you do all kinds of time frames especially time frames where you have gaps in time over 24hr? Like accounting for close/swap on 24hr currency markets or commodities / indexes ?
clickhouse downsample into OHLC time bar intervals on…

user10078199
- 141
- 2
- 8
0
votes
2 answers
How initialize the result of groupArray function of the ClickHouse to the array
In my Go application, I make a request to the ClickHouse database via clickhouse-go package. This query which I make return always only one record and it's an array of integers. Is there any way to initialize that result to the array in Go?
var ids…

Nurzhan Nogerbek
- 4,806
- 16
- 87
- 193