Hi I have this Store Procedure I need some help to make the Two SQL statements into one statement can anyone help
Create PROCEDURE GetReportByDynamicQuestion
@DynamicQuestionID uniqueidentifier
AS
BEGIN
Select Distinct
Count (*) as [Total],
Response,
((Count (*)*100)/(select COUNT(*)
from
DynamicRegistration_QuestionResponse
where DynamicQuestionID = @DynamicQuestionID)) as [Percentage]
From
DynamicRegistration_QuestionResponse
where DynamicQuestionID = @DynamicQuestionID
group by Response
select
COUNT(*) as [Total Response],
((Count (*)*100)/(select COUNT(*)
from
DynamicRegistration_QuestionResponse
where DynamicQuestionID = @DynamicQuestionID)) as [total Percentage]
from DynamicRegistration_QuestionResponse
where DynamicQuestionID = @DynamicQuestionID;
END