下面是你可以在 Druid 上尝试进行查询的一些实例供你测试:
SELECT FLOOR(__time to HOUR) AS HourTime, SUM(deleted) AS LinesDeleted
FROM wikipedia WHERE "__time" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00'
GROUP BY 1
SELECT channel, page, SUM(added)
FROM wikipedia WHERE "__time" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00'
GROUP BY channel, page
ORDER BY SUM(added) DESC
Druid 能够进行一些比较灵活的查询,因此对基本的 SQL 掌握还是需要的。
还未添加个人签名 2021.03.06 加入
还未添加个人简介
促进软件开发及相关领域知识与创新的传播
评论