So, the SQL code I made to complete this query is as below:
SELECT stories.*, COUNT(*) AS v
FROM stories, views
WHERE stories.story_id = views.story_id
GROUP BY stories.story_id
ORDER BY v DESC;
How would I translate this into Sequel?
So, the SQL code I made to complete this query is as below:
SELECT stories.*, COUNT(*) AS v
FROM stories, views
WHERE stories.story_id = views.story_id
GROUP BY stories.story_id
ORDER BY v DESC;
How would I translate this into Sequel?
Copyright © 2021 Jogjafile Inc.