Last answered:

17 Nov 2023

Posted on:

06 Nov 2023

0

Getting different result on Count Function using >1 inside the bracket. Kindly explain?

3 answers ( 0 marked as helpful)
Instructor
Posted on:

08 Nov 2023

0

Hi Maimuna!
Thanks for reaching out.


The difference you're seeing in the result set is due to the incorrect use of the COUNT function, which results in a logical error in the context of what you're trying to achieve. The correct and meaningful use of COUNT() in conjunction with the HAVING clause is demonstrated in solution query, which is why you're seeing expected results there. The second query doesn't logically make sense in the context of your intended use and may produce incorrect or unintended results.


Hope this helps.
Best,
Tsvetelin

Posted on:

12 Nov 2023

0

Hi Tsvetelin,

Can you please explain?

Posted on:

17 Nov 2023

0

I think that the second one is wrong logicaly ,

there are nothing like that 

"count(..........>1)"

but ,

"count() > num " and close the para , put the condition.

Submit an answer