HAVING は、 GROUP BY でグループ化したデータを条件でさらに絞り込みます。 たとえば、 SELECT password, COUNT(password) FROM users GROUP BY password HAVING COUNT(password)>1; です。