I am trying to find all records that have the same groupCol , but more than one, not equal to 0 infoCol . Here is a complete example of what I'm trying to do.
CREATE TABLE
However, the result of my query is
groupCol distinctInfoCol
-------------- ---------------
ExcludedZero 2
NoRows 3
TwoResults 2
When I expected my conclusion would be
groupCol distinctInfoCol
-------------- ---------------
TwoResults 2
ThreeResults 3
TwoAndZero 2
What am I doing wrong, and how can I fix this to get the right results?
source share