mysql - mysql -- ERROR 1064 (42000): .... near '(PARTITION BY t1.DIGEST)
问题描述
我试图在 ubuntu/mysql 中执行这个查询:
SELECT t1.SCHEMA_NAME, CONCAT(ROUND(BUCKET_QUANTILE*100,2),"% under ",
BUCKET_TIMER_HIGH/1000000000," milliseconds") fact,
LEFT(QUERY_SAMPLE_TEXT,64) as QUERY_SAMPLE, t1.DIGEST,
COUNT(t1.DIGEST)
OVER(PARTITION BY t1.DIGEST) as TOT
FROM events_statements_histogram_by_digest t1
JOIN events_statements_summary_by_digest t2
ON t2.DIGEST = t1.DIGEST
WHERE COUNT_BUCKET >1
ORDER BY t1.DIGEST, BUCKET_TIMER_HIGH DESC
LIMIT 10\G
结果:
ERROR 1064 (42000): You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version
for the right syntax to use near
'(PARTITION BY t1.DIGEST) as TOT FROM events_statements_histogram_by_digest t1 JO'
at line 1
我还没有找到纠正该查询的方法。请帮忙。谢谢。
解决方案
推荐阅读
- php - nginx:[emerge] 未知“1”变量 - 在变量编号周围使用花括号时
- javascript - 用户加入时的 Discord.js 自定义图像
- python - 模拟 2 个人掷硬币直到获得第一个头 Python
- c++ - 用性能监听内核线程中的变量变化
- kubernetes - 如何从本地机器向远程 Kubernetes 集群提交 Dask 作业
- python - Python - 函数内部的while循环没有产生一致的结果
- reactjs - 反应未定义的属性
- angular - 当应用程序在 Angular 中启动时如何调用服务?
- excel - Excell VBA 运行时错误“1004”:应用程序定义或对象定义错误
- java - 用 Java 下载几个文件后,下载速度显着减慢