### Instruction: CREATE TABLE Employee (EmployeeId INT, UserId INT, ApplicationId INT, RoleId INT, ShiftId INT, UserName NVARCHAR, EmpCode NVARCHAR, FirstName NVARCHAR, LastName NVARCHAR, MiddleName NVARCHAR, FatherName NVARCHAR, ImageFilePath NVARCHAR, Phone NVARCHAR, CellPhone NVARCHAR, IsMobileNumberPublic BIT, OfficePhone NVARCHAR, Extension NVARCHAR, Email NVARCHAR, IsEmailIdPublic BIT, AlternateEmailId NVARCHAR, QuitDate DATETIME, DepartmentId INT, CompanyID INT, BranchID INT, DesignationId INT, ReligionId INT, NationalityId INT, BloodTypeId INT, BloodType NVARCHAR, MaritalStatusId INT, PlaceOfBirth NVARCHAR, BirthDate DATETIME, JoiningDate DATETIME, Gender NVARCHAR, HousePhone NVARCHAR, IsLeavedJob BIT, LeaveJobDate DATETIME, LeaveJobReason NVARCHAR, TaxID NVARCHAR, SocialSecurityNo NVARCHAR, Status INT, ReportingToEmpId INT, CreatedOn DATETIME, UpdatedBy INT, CreatedBy INT, UpdatedOn DATETIME, EmpStatusId INT, ReportingToHrId INT, EmployeeStatus NVARCHAR, title NVARCHAR, PFNo NVARCHAR, ESINo NVARCHAR, SeriesTypeID INT, EmpCodeValue NVARCHAR, IsEmployeeExit BIT, IsfullFinalsettelement BIT, ExitDate DATETIME, RepotingToEMPCode NVARCHAR, CTC DECIMAL, CreatedMachineIP NVARCHAR, UpdatedMachineIP NVARCHAR, IsTDSapplicable BIT, GrossPay DECIMAL, IsExcludePayroll BIT, ReportingToFunctionalManager INT, SubDepartmentId INT, Sub_SubDepartmentId INT, WorkerType INT, EmployeeGrade INT, EmpExitType NVARCHAR, JobLevelId INT, PayTypeId INT, ClientId INT)
CREATE TABLE LeaveApplication (LeaveId INT, EmployeeId INT, ProxyEmpId INT, LeaveTypeId INT, GroupConfigId INT, LeaveConfigId INT, LeaveFrom DATETIME, LeaveTo DATETIME, Description NVARCHAR, AttachmentPath NVARCHAR, DateOfApplication DATETIME, CommunicationAddress NVARCHAR, ApproveById INT, DeclinedByIds NVARCHAR, LeaveAvailed INT, NoOfHoliday INT, NoOfWeekOff INT, NoOfPaidLeave INT, NoOfUnPaidLeave INT, LeaveStatus NVARCHAR, IsActive BIT, DeclinedReason NVARCHAR, CreatedBy INT, CreatedOn DATETIME, CreatedMachineIp NVARCHAR, UpdatedBy INT, UpdatedOn DATETIME, UpdatedMachineIp NVARCHAR, OnBehalfofEmpId INT, IsHalfDay BIT, HalfDayType NVARCHAR, LWP BIT, IsSWLeave BIT, IsClubedLeave BIT, NoSWLeave INT, Level INT, LeaveConsumptionType NVARCHAR, HalfDay_Type NVARCHAR, StartTime DATETIME, EndTime DATETIME, Duration INT, WorkFlowId INT) --Using valid MS SQL Server, answer the following questions for the tables provided above. -- Tell me the names of employees with leave periods exceeding 10 days. 
### Response: SELECT E.EmployeeId, E.FirstName, E.LastName, LA.LeaveTypeId, LA.LeaveFrom, LA.LeaveTo
    FROM LeaveApplication AS LA
    INNER JOIN Employee AS E ON LA.EmployeeId = E.EmployeeId
    WHERE DATEDIFF(day, LA.LeaveFrom, LA.LeaveTo) >=10
    AND LA.LeaveStatus = 'Approved'