Phenom Interview Question

Why Group by and having. Difference between group by and where etc;