I have got sql table which has 2 columns userid and products, userid is unique while products will have 3 values[0,1,-1] -1 represents no products bought, 1 represents product currently
being used, while 0 represents product has been used.
What i want is a percentage query for total users in the table
product used (%): ?
products currently in use (%): ?
product not sold(%): ?
Any suggestion or assistance will be highly appreciated
Thanks

What I have tried so far?
Select count(userId) * 100 / (select count(products) Where products = 1) AS perc
from product group by userid
Try this: