1

我需要按文件加载时间过滤数据库表。

这就是我现在拥有的:

SELECT url, timings_wait, SUM( timings_wait ) 
FROM request_detail
GROUP BY url
ORDER BY SUM( timings_wait ) DESC 
LIMIT 0 , 30

查询选择所有文件,为每个文件求和加载时间,并按每个文件的总加载时间对列表进行排序;

请帮助获取按每个文件最长的时间排序的列表,而不是总加载时间

4

2 回答 2

0
SELECT url, timings_wait, SUM( timings_wait ) AS s, MAX( timings_wait ) AS m
FROM request_detail
GROUP BY url
ORDER BY MAX( timings_wait ) DESC 
LIMIT 0 , 30
于 2013-11-04T10:13:04.063 回答
0
SELECT url, timings_wait, SUM( timings_wait ) 
FROM request_detail
GROUP BY url
ORDER BY timings_wait DESC 
LIMIT 0 , 30
于 2013-11-04T10:18:03.857 回答