I want to retrieve data in the format:
Category, Question, Status, Answer I dont want any repetition so I retrieved unique Category, Question & Status by:
select distinct category, question, status from sharepoint_vw However I want to have an additional column as 'Answer' to be a % value calculated by the expression:
=SUM(IIF(Fields!Status.Value="Unfavourable",1,0))/COUNT(Fields!Status.Value) I just dont know how to convert this expression into SQL and combine it with the select distinct query to get the results I need.