Jump to content

[SOLVED] Please help with this mysql query statement


engelsol

Recommended Posts

please help me with this statement. I want to get:

 

1-list of most commented stories

 

SELECT articles.story_id, articles.headline, count(comments.comment_id) AS counter
FROM articles LEFT JOIN comments ON articles.story_id = comments.story_id 
GROUP BY articles.story_id
ORDER BY counter DESC 	
LIMIT 20

 

engelsol

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.