This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------- | |
-- 报文结构定义 | |
---------------- | |
CMPPv2_Field_Protos = { | |
Command_Name = { | |
[0x00000001] = "CMPP_CONNECT", | |
[0x80000001] = "CMPP_CONNECT_RESP", | |
[0x00000002] = "CMPP_TERMINATE", | |
[0x80000002] = "CMPP_TERMINATE_RESP", | |
[0x00000004] = "CMPP_SUBMIT", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
databases: | |
- logs: 7 | |
- vms: 9 | |
- statistics: 20 | |
connect_line: '127.0.0.1' | |
log_file: 'cl_clean_partitions.log' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
milovidov@milovidov-xenial:~$ clickhouse-client | |
ClickHouse client version 1.1.53996. | |
Connecting to localhost:9000. | |
Connected to ClickHouse server version 1.1.53996. | |
:) CREATE TABLE IF NOT EXISTS `employee` ( | |
:-] `empid` Int32, | |
:-] `deptid` Int32, | |
:-] `salary` Int64 | |
:-] ) ENGINE = Memory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:) SELECT toDateTime(intDiv(toUInt32(EventTime), 5) * 5) AS k, count(), uniq(UserID) FROM hits_layer WHERE CounterID = 29761725 AND EventDate = today() AND EventTime >= now() - 600 GROUP BY k ORDER BY k | |
SELECT | |
toDateTime(intDiv(toUInt32(EventTime), 5) * 5) AS k, | |
count(), | |
uniq(UserID) | |
FROM hits_layer | |
WHERE (CounterID = 29761725) AND (EventDate = today()) AND (EventTime >= (now() - 600)) | |
GROUP BY k | |
ORDER BY k ASC |