group by having sql interview questions