Skip to content

Tag: aggregate-functions

calculating percentage on multiple sql tables

There are 2 tables mobile and web Table name: Mobile Table name: web I need to calculate percentage of users who only visited : mobile, web and both. That is, the percentage of users who are only in the mobile table, only in the web table and in both tables. The sum should be 1. I tried using union but

Weighted Average of Survey Questions

I have to calculate weighted average for all questions. Assuming there are 22 questions in a survey which has 5 options as 1,2,3,4,5 and NA. For example, 3 people took the survey (all 22 question) Assuming there are 10 NA responses (combined for all 3). So, denominator will be : 22*3 – 10 = 56 Numerator…