Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I guess my question is very easy, still can't find solution..
I have table:
Class | Nr2. |
LIRIKA | K000545 |
LIRIKA | K000545 |
LIRIKA | K000545 |
LIRIKA | K000650 |
LIRIKA | K000703 |
LIRIKA | K000168 |
LIRIKA | K000551 |
I need to get count of all unique Nr2 for each class.
I use Count(nr2) and get sum of all rows - the result is 7
But I need only count unique Nr2 .. and the result must be 5. How can I modify my COUNT?
Class | Nr2. |
LIRIKA | K000545 |
LIRIKA | K000650 |
LIRIKA | K000703 |
LIRIKA | K000168 |
LIRIKA | K000551 |
Hi
Try
Count(Distinct nr2)
Mark
May be one of these:
Count(DISTINCT nr2)
or
Count(Aggr(Count(Distinct nr2), Class))
use rownum()
or
count(distinct urfield)
Count(Distinct Nr2.)
Thanks to all of you!