
WHERE filters individual rows before they are grouped, and HAVING filters whole groups after GROUP BY has run. That's why only HAVING can use aggregate functions such as SUM(), COUNT() and AVG(). Use
Student web developer — PHP, JavaScript, Next.js
I write practical coding tutorials at https://mfaysal.com | Learning cybersecurity on TryHackMe: https://tryhackme.com/p/mfaysal.dev
Markdown supported · ⌘↵ to post
No responses yet.