我试图在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
我还没有找到更正该查询的方法。请帮忙。谢谢。