### Instruction: 
CREATE TABLE employeedetails (EmployeeId numeric,UserId int,UserName varchar,EmpCode varchar,title varchar,FirstName nvarchar,MiddleName nvarchar,FatherName varchar,Phone nvarchar,CellPhone nvarchar,
IsMobileNumberPublic bit,OfficePhone nvarchar,Extension varchar,Email nvarchar,IsEmailIdPublic bit,AlternateEmailId varchar,QuitDate datetime,DeptName varchar,DesignationName varchar,Religion varchar,Nationality varchar,PlaceOfBirth nvarchar,BirthDate datetime,JoiningDate datetime,Gender varchar,HousePhone nvarchar,MaritalStatusName varchar,BranchName varchar,ReportingManagerName nvarchar,EmployeeGrade int,IsEmployeeExit bit,ExitDate datetime,ReasonToLeave nvarchar,IsLeavedJob bit,SocialSecurityNo nvarchar,LeaveJobDate datetime,Status int,CreatedOn datetime,UpdatedOn datetime,PFNo nvarchar,ESINo nvarchar,CTC decimal,CreatedMachineIP varchar,UpdatedMachineIP varchar,IsTDSapplicable bit,GrossPay decimal,WorkerType int,EmpExitType nvarchar,JobLevelName varchar,companyid int,branchid int)'' 
CREATE TABLE Exit_Employee_Details (ResignationId INT, EmployeeId INT, ResgDate DATETIME, Reason NVARCHAR, NoticePeriod INT, LastWorkingDate DATETIME, NoticePeriod_EmpChoice INT, LastWorkingDate_EmpChoice DATETIME, IsActive BIT, CreatedOn DATETIME, UpdatedOn DATETIME, CreatedBy INT, CreatedMachineIP NVARCHAR, UpdatedBy INT, UpdatedMachineIP NVARCHAR, ApproveByIds NVARCHAR, DeclinedReason NVARCHAR, ResignationStatus NVARCHAR, NoticePeriod_ManagerChoice INT, LastWorkingDate_ManagerChoice DATETIME, DeclinedByIds NVARCHAR, TaskHandover NVARCHAR, AssetHandover NVARCHAR, AccountHandover NVARCHAR, ITHandover NVARCHAR, FinalExit NVARCHAR, HrHandover NVARCHAR) --Using valid MS SQL Server, answer the following questions for the tables provided above. -- Count of employees in notice period? 
### Response: SELECT isnull(COUNT(DISTINCT eed.EmployeeId),0) AS [Number of Employees under Notice Period] FROM Exit_Employee_Details as eed inner join Employeedetails e ON eed.EmployeeId=e.EmployeeId WHERE  ResignationStatus='Approved' AND convert(date,LastWorkingDate,101)>=convert(date,getdate(),101)