select IFNULL(COUNT(notes.fk_story_id), 0) as commentcnt, storys.story_id as storyid, storys.story, story_users.first_name, story_users.last_name, storys.title from storys inner join story_users on storys.fk_user_id = story_users.user_id left join notes on storys.story_id = notes.fk_story_id where fk_status_id = 2 group by storys.story_id order by storyid desc
|SQL Syntax: How to Find Commonality Among Similar Results||2||32|
|MS SQL export CSV & schedule It||9||44|
|How to place a condition in a filter criteria in t-sql?||12||32|
|How to create a delete query to delete entire records||2||13|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
18 Experts available now in Live!