0

I want to make a web app for salary management. In which I want to calculate total number of leaves with in a year if there is more than 16 L present in my table than it will count as A absent.

How to make procedure for this?

Any help is appreciated.

4

1 回答 1

0

也许这可以工作。

SELECT
     EmployeeID,
     DaysAbsent=(SELECT COUNT(DISTINCT aDate)FROM aDateTable
                  WHERE Absent=1 and EmployeeID=Employees.EmployeeID)
FROM 
    Employess
于 2012-12-24T05:44:43.463 回答