sql query:
select
u.username,
@total_subscribers:=(
select count(s.id)
from subscribers as s
where s.suid = u.uid
) as total_subscribers
from users as u
where @total_subscribers > 0
if i remove where @total_subscribers > 0
query will show all users and their total subscribers
but i want to show only those users who have at least 1 subscriber... after i add the where clause and use the defined variable i get an empty result set.