15. Insights about users:
Get the geographic distribution of Taylor Swift channel (channel_id = 399) subscribers.
Note:
• Geographic distribution: Number of Taylor Swift subscribers present in each country. Ignore the countries where no_of_subscribers is 0.
• Order the result in the ascending order of the country name.
Expected Output Format
country
no_of_subscribers
select count(case when user_category='M' then 1 end) as male_cnt,
count(case when user_category='F' then 0 end) as female_cnt
from quiz.user_details
where Is_premium =1;
Comments
Leave a comment