I don't have much experience to SQL, and I can't seem to figure out this problem.
If I have a table like this:
select apps.name, count(distinct installs.user)
from installs, apps
where installs.id = apps.id;
You need to add the
More over avoid comma separated table concepts and use JOIN with ON.
Add alias name for each table to the better readability.
SELECT A.name, COUNT(DISTINCT I.user) FROM apps A INNER JOIN installs I ON I.id = A.id GROUP BY A.name;