Well I may have posted this earlier also, but unable to find the answer so far, so please help me on this one.
My database structure:
ATT (
SELECT
E1.F_Name AS A,
P1.Project_Name AS B,
Count(A1.Act_ID) AS C,
sum( IF( A1.Status IN ( 'Closed', 'OnHold' ), 0, 1 )) as D,
(Count(A1.Act_ID) / sum( IIF( A1.Status IN ( 'Closed', 'OnHold' ), 0, 1 ))) * 100 as E
FROM
ATT_Table A1
JOIN Employee_Table E1
ON A1.Assigned_To_ID = E1.Emp_ID
JOIN Project_Table P1
ON A1.Project_ID = P1.Project_ID
GROUP BY
F_Name, Project_Name;