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_id, ll.ll_title AS title_en, #cl_prio.cl_to AS priority, #cl_qual.cl_to AS quality, main.page_is_redirect AS is_redirect, main.page_len AS article_length, #talk.page_len AS talk_length, #! excluding subpage(s) # main.page_touched AS last_touched, #! not informative... i think #(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 # AND t_lt.lt_namespace = 0 # AND t_pl.pl_from_namespace = 0 # WHERE t_lt.lt_title = main.page_title #) 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 # AND t_lt.lt_namespace = 0 # AND t_pl.pl_from_namespace = 0 # WHERE t_pl.pl_from = main.page_id #) AS total_outlink FROM page AS talk # inner join to cut table size # focus to all possible priority INNER JOIN categorylinks AS cl_prio ON cl_prio.cl_from = talk.page_id AND cl_prio.cl_to IN ( 'Artikel_matematika_sangat_penting', 'Artikel_matematika_penting', 'Artikel_matematika_cukup_penting', 'Artikel_matematika_kurang_penting', 'Artikel_matematika_NA') # focus to all possible quality for an article in main namespace INNER JOIN categorylinks AS cl_qual ON cl_qual.cl_from = talk.page_id AND cl_qual.cl_to IN ( 'Artikel_matematika_kelas_AP', 'Artikel_matematika_kelas_MP', 'Artikel_matematika_kelas_AB', 'Artikel_matematika_kelas_B', 'Artikel_matematika_kelas_C', 'Artikel_matematika_kelas_awal', 'Artikel_matematika_kelas_rintisan', 'Artikel_matematika_kelas_daftar', 'Artikel_matematika_kelas_disambig', 'Artikel_matematika_kelas_pengalihan', 'Artikel_matematika_belum_dinilai') # join to get the main article's ID #INNER JOIN page AS main ON # main.page_namespace = 0 # AND main.page_title = talk.page_title # join because i need this data to help idwiki. left join is # intentional, to get empty result if page isn't created yet LEFT JOIN langlinks AS ll ON ll.ll_from = main.page_id AND ll.ll_lang = 'en'
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...