我有这个查询:
$score = 10;
SELECT timecode, count(tag) as n_tags, tag
FROM dados
WHERE dados.tag = 'tag1'
AND dados.filename = 'file.mp4'
AND (timecode >= '-5' AND timecode <= '15')
AND (timecode = '$score')
GROUP BY timecode
ORDER BY count(tag) DESC
但是我想将第 6 行更改为:
AND (timecode = '$score' AND n_tags > 3)
但这似乎不是正确的方法,它不起作用。
有任何想法吗 ?