sql group by having count 2