Some easy points for somebody here, take the following table of data:
EventCode ProcessId
---------- ---------
2 1
-6 3
42 1
-6 2
-12 2
23 4
4 2
-23 1
12 3
-26 1
I need a query that will get be a count of all Process ID where there is a negative event code. So from the dataset above the result would be 3 (Process ID’s 1,2 and 3 have negative event codes, process ID 4 does not)
Probably really simple, involving groups but I just can’t see the wood for the trees.
As a relevant aside, there are millions of rows in this table.
1 Answer