题目:从titles表获取按照title进行分组,每组个数大于等于2,给出title以及对应的数目t。
GROUPBY+HAVING
SELECT title, COUNT(*) t
FROM titles
GROUP BY title
HAVING t>=2;
题目:从titles表获取按照title进行分组,每组个数大于等于2,给出title以及对应的数目t。
GROUPBY+HAVING
SELECT title, COUNT(*) t
FROM titles
GROUP BY title
HAVING t>=2;