Toggle navigation
Home
New Query
Recent Queries
Discuss
Database tables
Database names
MediaWiki
Wikibase
Replicas browser and optimizer
Login
History
Fork
This query is marked as a draft
This query has been published
by
ShadowCipher02
.
This query focuses on articles related to fashion trends and identifies those with the highest number of revisions. You can adjust the LIMIT value to retrieve more or fewer results based on your interests.
Toggle Highlighting
SQL
USE enwiki_p; -- Switch to the "enwiki_p" database, which is the English Wikipedia database. SELECT -- Select the following fields for the query results: page.page_title AS Article_Title, -- Retrieve the article title and alias it as "Article_Title." COUNT(revision.rev_id) AS Revision_Count -- Calculate and count the number of revisions using "COUNT," and alias it as "Revision_Count." FROM -- Specify the tables and joins to retrieve data from: revision -- The "revision" table contains information about article revisions. JOIN page ON revision.rev_page = page.page_id -- Join the "revision" table with the "page" table on the page IDs to link revisions with articles. JOIN categorylinks ON page.page_id = categorylinks.cl_from -- Join the "categorylinks" table with the "page" table to link articles with categories. WHERE -- Define conditions for selecting data: page.page_namespace = 0 -- Limit the query to articles in the main namespace (namespace 0). AND categorylinks.cl_to = 'Fashion_trends' -- Select articles that belong to the "Fashion Trends" category. GROUP BY page_title -- Group the results by the article title to count revisions for each article. ORDER BY Revision_Count DESC -- Sort the results in descending order based on the revision count. LIMIT 10; -- Limit the results to the top 10 articles with the most revisions. -- End of the SQL query.
By running queries you agree to the
Cloud Services Terms of Use
and you irrevocably agree to release your SQL under
CC0 License
.
Submit Query
Stop Query
All SQL code is licensed under
CC0 License
.
Checking query status...