SELECT user_id, COUNT(*) AS clients_commented_for FROM (SELECT user_id, COUNT(*) FROM comments WHE...
I used fromSub method, I think it's the best way
uteqnl liked this reply
SELECT id, name, (SELECT COUNT(*) FROM commentsWHEREusers.id=comments.user_idANDcreated_at>= '2...
Error Code: 1242. Subquery returns more than 1 row
The Laravel portal for problem solving, knowledge sharing and community building.
The community