### 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 NREC_ScheduledInterview (InterviewId INT, CandidateId INT, JobId INT, InterviewDate DATETIME, InterviewStartTime DATETIME, InterviewEndTime DATETIME, InterviewerId INT, RoundId INT, CandidateStatus NVARCHAR, InterviewStatus NVARCHAR, IsSheduled BIT, Status INT, FeedbackID INT, FeedbackTime DATETIME, FeedBackWeakness NVARCHAR, FeedBackStrength NVARCHAR, FeedbackComment NVARCHAR, CreatedBy INT, CreatedOn DATETIME, CreatedMachineIp NVARCHAR, UpdatedBy INT, UpdatedOn DATETIME, UpdatedMachineIp NVARCHAR, ScreeningType NVARCHAR, ExternalInterviewerEmail NVARCHAR, ExternalInterviewerName NVARCHAR, InterpersonalSkillsComment NVARCHAR, CommunicationSkillsComment NVARCHAR, InterpersonalSkillsRating INT, CommunicationSkillsRating INT, IsExternalInterviewer BIT, IsDraft BIT, TimeZoneId INT, TimeZoneName NVARCHAR, IsImochaLinkShared BIT, ImochaAssessmentSetId INT, ImochaAssessmentSetName NVARCHAR, ImochaTestDuration INT, ImochaTestId INT, ImochaTestInvitationId INT, ImochaTestLink NVARCHAR, InstructionOrRemarks NVARCHAR, ExtInterviewerContactNumber NVARCHAR, InterviewSlots NVARCHAR, UpdatedByCandidateId INT, InterviewDuration INT, IsSharedWithClient BIT) --Using valid MS SQL Server, answer the following questions for the tables provided above. -- Selected - rejected candidate ratio 
### Response: SELECT COUNT(CASE WHEN CandidateStatus = 1 THEN 1 ELSE NULL END) AS [Selected Candidate Count], COUNT(CASE WHEN CandidateStatus = 2 THEN 1 ELSE NULL END) AS [Rejected Candidate Count] FROM NREC_ScheduledInterview as nsi inner join Employeedetails e ON nsi.CreatedBy = e.EmployeeId