We need to count the users who has the premium membership, but you are trying to sum instead of count(). And also in the WHERE clause, we need to check premium users have premium_membership value as 1 , and the value 0 is considered as non-premium user.
Get the number of male and female premium users in the platform.
gender total_users
F...
M...
SELECT COUNT(*)
FROM USER
WHERE premium_membership = 1
Comments
Leave a comment