I need to create a function which will return an average of Vacation hours based on Gender.I have written the following code:
CREATE FUNCTION fx_avgVacationHours
SELECT AVG (VacationHours)
But this code is returning me a NULL value.
Please let me know what wrong i am doing here.