select title,count(emp_no) as t
from titles
group by title
having t>=2;
考查having的用法,本地后面比较t>=2,t是中间变量,因此需要实用having限定条件,不可以用where。
select title,count(emp_no) as t
from titles
group by title
having t>=2;
考查having的用法,本地后面比较t>=2,t是中间变量,因此需要实用having限定条件,不可以用where。