I have data in a table that might look like so:
id | streetnum | name | item ----------------------------- 1 | 100 | a | 0 2 | 100 | b | NULL 3 | 100 | c | NULL 4 | 101 | d | NULL 5 | 101 | e | NULL 6 | 102 | f | 1
I'm trying to put together a query which would identify the identical streenum's where the item column has both a value and one or more NULL's. In the example above, the query's result should be:
100
My first instinct is to put together a nested query involving count(*) but I want to see what other ideas you guys come up with.