question

safi21 avatar image
safi21 asked

I want to find percentage value for a particular column name(cnt_base)

select * from (select 1 as id , b.STY_ATTRIBUTE1_DESC gender,c.ANSWER_DESC ,COUNT(distinct a.[RESPONDENT_KEY] ) cnt_base, ANSWER_DESC as Mean from FCT_RESPONSE a join CFG_STUDY_LABEL b on a.STUDY_KEY=b.STUDY_KEY join dim_question_answer c on a.answer_key = c.ANSWER_KEY where a.QUESTION_KEY='21' and a.PROJECT_KEY=1 and STY_ATTRIBUTE1 in (1) group by b.STY_ATTRIBUTE1_DESC,c.ANSWER_DESC)A join ( select COUNT(distinct a.[RESPONDENT_KEY] ) BASE from FCT_RESPONSE a join CFG_STUDY_LABEL b on a.STUDY_KEY=b.STUDY_KEY join dim_question_answer c on a.answer_key = c.ANSWER_KEY where a.QUESTION_KEY='21' and a.PROJECT_KEY=1 and STY_ATTRIBUTE1 in (1) )B On 1=1
sumaverage
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
what do you mean by "percentage value"? Can you post some sample data and desired results?
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.