M
mscertified
I need a query to do the following and cannot seem to figure out how to do
it. I'd like it done in a single query if possible.
The table contains columns for Userid, StartDate, End Date and Eligibility.
I need the query to return for each unique Userid between a given date
range, the total number of rows where Eligibility = "A" and the total number
where Eligibility = "B".
The result table should look like:
Userid TotalA TotalB
U1 0 10
U2 10 5
U3 5 0
I need the zeros in the total columns but not if the User has zero in both
columns.
it. I'd like it done in a single query if possible.
The table contains columns for Userid, StartDate, End Date and Eligibility.
I need the query to return for each unique Userid between a given date
range, the total number of rows where Eligibility = "A" and the total number
where Eligibility = "B".
The result table should look like:
Userid TotalA TotalB
U1 0 10
U2 10 5
U3 5 0
I need the zeros in the total columns but not if the User has zero in both
columns.