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
Kekavigi
.
Toggle Highlighting
SQL
SELECT main.page_title AS title_en, # beautify REPLACE(ll.ll_title,' ','_') AS title_id, REPLACE(cl_prio.cl_to,'-priority_mathematics_articles','') AS priority, REPLACE(REPLACE(cl_qual.cl_to,'_mathematics_articles',''),'-Class','') AS quality, main.page_len AS article_length, # get talk length, excluding subpage(s) talk.page_len AS talk_length, (SELECT # count unique(?) language of this article COUNT(t_ll.ll_lang) FROM langlinks AS t_ll WHERE t_ll.ll_from = main.page_id ) AS total_lang, (SELECT # count unique(?) articles in main namespace, that linked to this article COUNT(t_pl.pl_from) FROM pagelinks AS t_pl INNER JOIN linktarget AS t_lt ON t_lt.lt_id = t_pl.pl_target_id WHERE t_lt.lt_title = main.page_title AND t_lt.lt_namespace = 0 AND t_pl.pl_from_namespace = 0 ) AS total_inlink, (SELECT # count unique(?) article in main namespace, that linked from this article COUNT(t_pl.pl_target_id) FROM pagelinks AS t_pl INNER JOIN linktarget AS t_lt ON t_lt.lt_id = t_pl.pl_target_id WHERE t_pl.pl_from = main.page_id AND t_lt.lt_namespace = 0 AND t_pl.pl_from_namespace = 0 ) AS total_outlink FROM page AS talk INNER JOIN categorylinks AS cl_prio ON cl_prio.cl_from = talk.page_id INNER JOIN categorylinks AS cl_qual ON cl_qual.cl_from = talk.page_id # join to get the main article's ID INNER JOIN page AS main ON main.page_title = talk.page_title LEFT JOIN langlinks AS ll ON ll.ll_from = main.page_id WHERE main.page_namespace = 0 AND main.page_is_redirect = 0 AND ll.ll_lang = 'id' AND cl_prio.cl_to IN ( 'Top-priority_mathematics_articles', 'High-priority_mathematics_articles', 'Mid-priority_mathematics_articles', 'Low-priority_mathematics_articles', 'NA-priority_mathematics_articles', 'Unknown-priority_mathematics_articles') AND cl_qual.cl_to IN ( 'FA-Class_mathematics_articles', # featured article 'FL-Class_mathematics_articles', # featured list 'GA-Class_mathematics_articles', # good article 'B-Class_mathematics_articles', 'C-Class_mathematics_articles', 'Start-Class_mathematics_articles', 'Stub-Class_mathematics_articles', 'List-Class_mathematics_articles', 'Disambig-Class_mathematics_articles', 'Redirect-Class_mathematics_articles', 'Unassessed_mathematics_articles') # focus to non-biography math article AND main.page_title NOT IN ( SELECT page_title FROM page INNER JOIN categorylinks AS cl_biog ON cl_biog.cl_from = talk.page_id WHERE cl_biog.cl_to IN ( 'FA-Class_biography_articles', 'FL-Class_biography_articles', 'FM-Class_biography_articles', 'GA-Class_biography_articles', 'B-Class_biography_articles', 'C-Class_biography_articles', 'Start-Class_biography_articles' 'Stub-Class_biography_articles', 'List-Class_biography_articles', 'Disambig-Class_biography_articles', 'Redirect-Class_biography_articles', 'Unassessed_biography_articles') )
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...