Fork of
most viewed Pages for the last 24 hours
by Elph
This query is marked as a draft
This query has been published
by Nehaoua.
SQL
x
USE arwiki_p;
SELECT
p.page_title,
COUNT(*) AS view_count
FROM
page p
JOIN
revision r ON p.page_id = r.rev_page
WHERE
r.rev_timestamp BETWEEN DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 1 DAY), '%Y%m%d%H%i%S') AND DATE_FORMAT(NOW(), '%Y%m%d%H%i%S')
GROUP BY
p.page_title
ORDER BY
view_count DESC
LIMIT 50;
By running queries you agree to the Cloud Services Terms of Use and you irrevocably agree to release your SQL under CC0 License.
All SQL code is licensed under CC0 License.