• thanks Hugo, i really didnt know this. I was assuming that HAVING must have a corresponding GROUP by.