Support the ongoing development of Laravel.io →
Muhammed

Muhammed

Joined 19 Jun 2020

Statistics

Threads 1
Replies 4
Solutions 1
Articles 0

what is the best way to write this type of queries?

SELECT user_id, COUNT(*) AS clients_commented_for FROM (SELECT user_id, COUNT(*) FROM comments WHE...

Likes Replies
Solved

what is the best way to write this type of queries?

I used fromSub method, I think it's the best way

1 Likes
Solved

what is the best way to write this type of queries?

SELECT id, name, (SELECT COUNT(*) FROM commentsWHEREusers.id=comments.user_idANDcreated_at>= '2...

0 Likes

what is the best way to write this type of queries?

Error Code: 1242. Subquery returns more than 1 row

0 Likes

why can Not seed users table???

try > composer dumpautoload

0 Likes

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.