Pergunta de entrevista da empresa HTEC Group

What is difference between using GROUP BY together with WHERE and HAVING clause?

Resposta da entrevista

Sigiloso

21 de jun. de 2023

Difference is that, when we're using GROUP BY together with WHERE, the order of operations is that records are firstly filtered, and after that grouped. On the other side, HAVING is applied on the previously grouped/aggregated data.