SyntaxFix
Write A Post
Hire A Developer
Questions
Use the built in functions:
SELECT URLX, COUNT(URLx) AS Count FROM ExternalHits WHERE datex BETWEEN DATE_SUB(NOW(), INTERVAL 7 DAY) AND NOW() GROUP BY URLx ORDER BY Count DESC;