The below is my query,its getting a formation error,the query will describe the structure of it .....Could anyone help for this
SELECT (CAST(Empid AS VARCHAR)+' '+EmployeeName) AS Employee
,COUNT(ActualDate)Total_No_Days
,(SELECT COUNT(ActualDate)
from BufferListforBilling
where BufferEmpName IS NOT NULL
GROUP BY EmpId) as BillDays
,(SELECT COUNT(ActualDate)
from BufferListforBilling
where BufferEmpName IS NULL
GROUP BY EmpId) as NonBillDays
FROM BufferListforBilling
WHERE Team = 'ABC'
GROUP BY Empid ,EmployeeName
Empid ActualDate EmpName BuffEmpNames
===========================================
1 5/6/10 Roy NULL
1 6/6/10 Roy NULL
1 7/6/10 Roy Assigned
1 8/6/10 Roy Assigned
2 5/6/10 Deb Assigned
2 6/6/10 Deb NULL
2 7/6/10 Deb NULL
2 8/6/10 Deb NULL
The above is my table structure and i need to get a ouput like Below
Employee Total_No_of_Days Bill_Days Non_Bill_Days
===============================================================
1-Roy 4 2 2
2-Deb 4 1 3