Hi Jo
your actual table is too big, and I cannot map the values from the question to the actual table, So I am using the table which you have given here....
if that is the case then the below code should work
select UserID
,Count(1) as Total
,Count( CASE WHEN Statusid >=2 THEN 1 ELSE 0 END) AS StatusID
,CreatedDate
From <your table>
group by UserID,CreatedDate
Nothing is Permanent... even Knowledge.... My Blog
No comments:
Post a Comment