I need to modify my query to select information that is 1 day, 1 week old.
I have 2 tables one for votes and other for articles, and It should look at st_date from articles table.
Query
SELECT stories.*, SUM(votes.vote_value) as 'total_votes'
FROM stories
JOIN votes ON stories.id = votes.item_name
GROUP BY stories.id
ORDER BY total_votes DESC LIMIT 10
Database Structure:
Stories table

Votes Table

A week is always 7 days, so you actually need data from 8 days old.
Your full query would be: