SQL
AخA
-- Query to find the longest pages in Wikipedia MAINSPACE ONLY
-- This query sorts pages by length in mainspace (namespace 0) and shows the full URL
-- Run this on the 'enwiki_p' database in Quarry
SELECT
CONCAT('https://en.wikipedia.org/wiki/',
REPLACE(page_title, ' ', '_')
) AS Full_URL,
page_len AS Length_in_Bytes
FROM page
WHERE page_namespace = 0 -- ONLY mainspace articles
AND page_is_redirect = 0 -- Exclude redirects
AND page_len > 0 -- Only pages with content
ORDER BY page_len DESC -- Sort by descending length
LIMIT 100; -- Show top 100 results
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.