Re: select statement with count
Is this what you mean? ...
select users.name, ifnull(x.N,0) as theCount
from users
join (
select userid, count(*) as N
from userdocs
group by userid
) as x on users.id=userdocs.userid;
Subject
Written By
Posted
November 09, 2019 07:50AM
Re: select statement with count
November 09, 2019 10:20AM
November 09, 2019 10:49AM
November 09, 2019 11:03AM
November 09, 2019 11:22AM
November 12, 2019 12:12PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.