Answer to Question #284270 in Databases | SQL | Oracle | MS Access for swsq

Question #284270

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.

Expected Output Format

gender total_users

F...

M...


1
Expert's answer
2022-01-03T04:27:46-0500
SELECT COUNT(*) 
FROM USER
WHERE premium_membership = 1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS