惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

ClickHouse

有没有熟悉 clickhouse 的? clickhouse 对于分布式支持的如何? ClickHouse 的 MaterializedMySQL 引擎 - V2EX 两条数据库创建语句产生了同样的效果 CREATE DATABASE hello1; 与 CREATE DATABASE hello ON CLUSTER 'xxxxx'; 大佬们,我又来了!群晖装 clickhouse,撑得住吗? 究竟是什么在占用着内存 求大佬优化一下 3000 万数据的 NOT IN 查询 求大佬优化 3000w 数据多 UNION clickhouse 文档里的划分冷热多盘存储配置真的是按时间划分冷热数据的吗? - V2EX 请教各位大佬关于 clickhouse 的问题 - V2EX
我这个场景, clickhouse 适用吗? - V2EX
wenjun19931112 · 2021-06-03 · via ClickHouse
leiuu

7

leiuu      2021 年 6 月 3 日

我试了下结果是符合预期的呢,
```sql
CREATE TABLE user_order_price
(
userId UInt64,
orderId UInt8,
price Float64,
sign Int8,
version UInt8
)
ENGINE = VersionedCollapsingMergeTree(sign, version)
ORDER BY (userId,orderId)

INSERT INTO user_order_price VALUES (101, 10000, 100, 1, 1),(101, 10000, 100, -1, 2),(102, 10000, 200, 1, 2)

INSERT INTO user_order_price VALUES (103, 10000, 500, 1, 2)

SELECT
userId,
sum(price * sign) AS avgPrice
FROM user_order_price
GROUP BY userId

```
结果不准确是指哪个位置