Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个查询:
SELECT tag, filename, timecode, COUNT(tag) AS total FROM dados WHERE dados.tag = 'movie' AND dados.filename = 'movie2.mp4' GROUP BY timecode
这是结果:
但我只想要第 3 行,更准确地说是 timecode=2,因为它是具有较高值的最组成的标签。我怎样才能从这些行中获取时间码的最高值?
ORDER BY与_LIMIT
ORDER BY
LIMIT
SELECT tag, filename, timecode, COUNT(tag) AS total FROM dados WHERE dados.tag = 'movie' AND dados.filename = 'movie2.mp4' GROUP BY timecode ORDER BY COUNT(tag) DESC LIMIT 1