Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexey-milovidov/af93e87433a23181a86556ca85dbc289 to your computer and use it in GitHub Desktop.
Save alexey-milovidov/af93e87433a23181a86556ca85dbc289 to your computer and use it in GitHub Desktop.
ClickHouse client version 1.1.54371.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54371.
localhost :) USE test
USE test
Ok.
0 rows in set. Elapsed: 0.095 sec.
localhost :) CREATE TABLE table1 (A UInt8, B UInt8, C UInt8) ENGINE = TinyLog
CREATE TABLE table1
(
A UInt8,
B UInt8,
C UInt8
)
ENGINE = TinyLog
Ok.
0 rows in set. Elapsed: 0.043 sec.
localhost :) INSERT INTO table1 SELECT number, number, number FROM numbers(20)
INSERT INTO table1 SELECT
number,
number,
number
FROM numbers(20)
Ok.
0 rows in set. Elapsed: 0.143 sec.
localhost :) select A,B from table1 group by C limit 10
SELECT
A,
B
FROM table1
GROUP BY C
LIMIT 10
Received exception from server (version 1.1.54371):
Code: 215. DB::Exception: Received from localhost:9000, 127.0.0.1. DB::Exception: Column A is not under aggregate function and not in GROUP BY..
0 rows in set. Elapsed: 0.127 sec.
localhost :) select A,B from table1 where C = 1000 limit 10
SELECT
A,
B
FROM table1
WHERE C = 1000
LIMIT 10
Ok.
0 rows in set. Elapsed: 0.039 sec.
localhost :) select A,B from table1 where C = 11 limit 10
SELECT
A,
B
FROM table1
WHERE C = 11
LIMIT 10
┌──A─┬──B─┐
│ 11 │ 11 │
└────┴────┘
1 rows in set. Elapsed: 0.012 sec.
localhost :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment