Hey guys,
I've gone rusty on my SQL skills and so annoyed that I can't get the count function to work like I want.
Basically, I want my query to list all SSNS that have more than one record in the table. I have this query:
It does retrieve the right SSNS and tells me how many times the SSN occurs in the table. However, I want my query results to display their full records.
For example
SSN NAME4 COUNT
123445555 WALTER - 4
I want the query to show me all four records for this SSN. I thought removing the count field would do this, but it still gives me only one instance of each SSN. What am I missing here?
I've gone rusty on my SQL skills and so annoyed that I can't get the count function to work like I want.
Basically, I want my query to list all SSNS that have more than one record in the table. I have this query:
Code:
SELECT SSN, name4, count(*) from [1099_PER]
group by SSN, name4
having count(SSN) > 1
For example
SSN NAME4 COUNT
123445555 WALTER - 4
I want the query to show me all four records for this SSN. I thought removing the count field would do this, but it still gives me only one instance of each SSN. What am I missing here?