Q1.
Create a scalar function that calculates an employee’s annual salary based on their
monthly salary.
Q2.
Create a scalar function that classifies an employee's experience level based on their
years of service:
• Less than 2 years → 'Junior'
• 2–5 years → 'Mid-Level'
• More than 5 years → 'Senior'
Q3.
Create a scalar function that determines if an employee is eligible for a bonus based on:
• Salary < 5000 → Eligible
• Otherwise → Not Eligible
Q4.
Create a scalar function that calculates the number of days an employee has been
employed as amanager (using their hiring date).
Q5.
Create a multi-statement table-valued function that returns:
• Employee ID
• Number of projects the employee is assigned to
Q6.
Create a scalar function that evaluates department performance by taking the average
salary of all employees in the department:
• 7000 → 'High Performing'
• 4000–7000 → 'Moderate'
• < 4000 → 'Needs Improvement'
Q7.
Create a multi-statement table-valued function that returns for each department:
• Department name
• Total number of employees
• Average salary