Want to add a list of most viewed items on my online store

gesf

Active member
Hello rebaguy and welcome to our forum!

If i get it right, you have your answer in this next SQL query sample:
Code:
SELECT item_id FROM items_table WHERE date >= DATE_SUB(CURDATE(), INTERVAL 7 DAY) GROUP BY item_hits;

Hope it helps!
 
Back
Top