I’m developing an ASP.NET web application using Visual Studio 2010 professional and a SQL Server database. I have some records in the database for the next tables:

Is there a way to calculate for example with only one query, how many records in table sarcini has stare_task (means task_state) = closed according to each employee(angajat) foreign key in sarcini?
I think this is too ambigous but I don’t know how to explain exactly what I mean.
Assuming MS SQL Server and that you are just using table sarcini..
Edit: Sql Fiddle example: http://sqlfiddle.com/#!3/c2c89/2