我需要按文件加载时间过滤数据库表。
这就是我现在拥有的:
SELECT url, timings_wait, SUM( timings_wait )
FROM request_detail
GROUP BY url
ORDER BY SUM( timings_wait ) DESC
LIMIT 0 , 30
查询选择所有文件,为每个文件求和加载时间,并按每个文件的总加载时间对列表进行排序;
请帮助获取按每个文件最长的时间排序的列表,而不是总加载时间
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
SELECT url, timings_wait, SUM( timings_wait )
FROM request_detail
GROUP BY url
ORDER BY timings_wait DESC
LIMIT 0 , 30