Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can do this , but it's better to make a separate field / table and recalculate when adding / deleting.
select a.id, a.name, count(b.id) from users a
left join articles b on b.user_id = a.id
group by a.id, a.name
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question